<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-05-11T16:31:25Z</updated>
<entry>
<title>drm/amdgpu: Support DRM_MODE_PAGE_FLIP_ASYNC (v2)</title>
<updated>2016-05-11T16:31:25Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2016-05-05T20:03:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb9e59d7e999c68b79f23d6016b08fc5d0bb8a8d'/>
<id>urn:sha1:cb9e59d7e999c68b79f23d6016b08fc5d0bb8a8d</id>
<content type='text'>
When this flag is set, we program the hardware to execute the flip
during horizontal blank (i.e. for the next scanline) instead of during
vertical blank (i.e. for the next frame).

Ported from radeon commit:
drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC

v2: drop DAL change for upstream

Reviewed-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd: cleanup remaining spaces and tabs v2</title>
<updated>2016-05-11T16:31:20Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2016-05-03T13:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=edf600dac65eecb6c8bcf21fa986db30ee21a2ac'/>
<id>urn:sha1:edf600dac65eecb6c8bcf21fa986db30ee21a2ac</id>
<content type='text'>
This is the result of running the following commands:
find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/[ \t]\+$//' {} \;
find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/[ \t]\+$//' {} \;
find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/ \+\t/\t/' {} \;
find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/ \+\t/\t/' {} \;

v2: drop changes to DAL and internal headers

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: bump the afmt limit for CZ, ST, Polaris</title>
<updated>2016-05-05T00:23:43Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2016-04-18T22:25:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2238445925467024de1306500de00b3c0eb1ac1f'/>
<id>urn:sha1:2238445925467024de1306500de00b3c0eb1ac1f</id>
<content type='text'>
Fixes array overflow on these chips.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>drm/amdgpu: use defines for CRTCs and AMFT blocks</title>
<updated>2016-05-05T00:23:35Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2016-04-18T22:09:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f195038c7ea5ae161652701de6ad7416fbe44d50'/>
<id>urn:sha1:f195038c7ea5ae161652701de6ad7416fbe44d50</id>
<content type='text'>
Prerequiste for the next patch which ups the limits.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>drm/amdgpu: remove page flip work queue v3</title>
<updated>2016-02-16T22:25:38Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2016-02-11T16:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87d58c11ec17234c4636a588466260a95fec59cb'/>
<id>urn:sha1:87d58c11ec17234c4636a588466260a95fec59cb</id>
<content type='text'>
Just use the system queue now that we don't block any more.

v2: handle DAL as well.
v3: agd: split DAL changes out

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Mykola Lysenko &lt;mykola.lysenko@amd.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt; (v1)
</content>
</entry>
<entry>
<title>drm: Move LEAVE/ENTER_ATOMIC_MODESET to fbdev helpers</title>
<updated>2015-12-08T15:07:51Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2015-12-04T08:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b516a9efb7af38733ba2308fc7c0f49f034f53bd'/>
<id>urn:sha1:b516a9efb7af38733ba2308fc7c0f49f034f53bd</id>
<content type='text'>
This is only used for kgdb (and previously panic) handlers in
the fbdev emulation, so belongs there.

Note that this means we'll leave behind a forward declaration, but
once all the helper vtables are consolidated (in the next patch) that
will make more sense.

v2: fixup radone/amdgpu.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1449218769-16577-3-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt; (v2)
</content>
</entry>
<entry>
<title>Back merge tag 'v4.4-rc4' into drm-next</title>
<updated>2015-12-08T01:04:26Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2015-12-08T01:04:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e876b41ab074561d65f213bf5e0fc68cf5bc7380'/>
<id>urn:sha1:e876b41ab074561d65f213bf5e0fc68cf5bc7380</id>
<content type='text'>
We've picked up a few conflicts and it would be nice
to resolve them before we move onwards.
</content>
</entry>
<entry>
<title>drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3)</title>
<updated>2015-12-04T20:15:07Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2015-12-03T17:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e36f9d33c134d5c6448ad65b423a9fd94e045cf'/>
<id>urn:sha1:8e36f9d33c134d5c6448ad65b423a9fd94e045cf</id>
<content type='text'>
commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many
vblanks were missed" introduced in Linux 4.4-rc1 makes the drm core
more fragile to drivers which don't update hw vblank counters and
vblank timestamps in sync with firing of the vblank irq and
essentially at leading edge of vblank.

This exposed a problem with radeon-kms/amdgpu-kms which do not
satisfy above requirements:

The vblank irq fires a few scanlines before start of vblank, but
programmed pageflips complete at start of vblank and
vblank timestamps update at start of vblank, whereas the
hw vblank counter increments only later, at start of vsync.

This leads to problems like off by one errors for vblank counter
updates, vblank counters apparently going backwards or vblank
timestamps apparently having time going backwards. The net result
is stuttering of graphics in games, or little hangs, as well as
total failure of timing sensitive applications.

See bug #93147 for an example of the regression on Linux 4.4-rc:

https://bugs.freedesktop.org/show_bug.cgi?id=93147

This patch tries to align all above events better from the
viewpoint of the drm core / of external callers to fix the problem:

1. The apparent start of vblank is shifted a few scanlines earlier,
so the vblank irq now always happens after start of this extended
vblank interval and thereby drm_update_vblank_count() always samples
the updated vblank count and timestamp of the new vblank interval.

To achieve this, the reporting of scanout positions by
radeon_get_crtc_scanoutpos() now operates as if the vblank starts
radeon_crtc-&gt;lb_vblank_lead_lines before the real start of the hw
vblank interval. This means that the vblank timestamps which are based
on these scanout positions will now update at this earlier start of
vblank.

2. The driver-&gt;get_vblank_counter() function will bump the returned
vblank count as read from the hw by +1 if the query happens after
the shifted earlier start of the vblank, but before the real hw increment
at start of vsync, so the counter appears to increment at start of vblank
in sync with the timestamp update.

3. Calls from vblank irq-context and regular non-irq calls are now
treated identical, always simulating the shifted vblank start, to
avoid inconsistent results for queries happening from vblank irq vs.
happening from drm_vblank_enable() or vblank_disable_fn().

4. The radeon_flip_work_func will delay mmio programming a pageflip until
the start of the real vblank iff it happens to execute inside the shifted
earlier start of the vblank, so pageflips now also appear to execute at
start of the shifted vblank, in sync with vblank counter and timestamp
updates. This to avoid some races between updates of vblank count and
timestamps that are used for swap scheduling and pageflip execution which
could cause pageflips to execute before the scheduled target vblank.

The lb_vblank_lead_lines "fudge" value is calculated as the size of
the display controllers line buffer in scanlines for the given video
mode: Vblank irq's are triggered by the line buffer logic when the line
buffer refill for a video frame ends, ie. when the line buffer source read
position enters the hw vblank. This means that a vblank irq could fire at
most as many scanlines before the current reported scanout position of the
crtc timing generator as the number of scanlines the line buffer can
maximally hold for a given video mode.

This patch has been successfully tested on a RV730 card with DCE-3 display
engine and on a evergreen card with DCE-4 display engine, in single-display
and dual-display configuration, with different video modes.

A similar patch is needed for amdgpu-kms to fix the same problem.

Limitations:

- Maybe replace the udelay() in the flip_work_func() by a suitable
  usleep_range() for a bit better efficiency? Will try that.

- Line buffer sizes in pixels are hard-coded on &lt; DCE-4 to a value
  i just guessed to be high enough to work ok, lacking info on the true
  sizes atm.

Probably fixes: fdo#93147

Port of Mario's radeon fix to amdgpu.

Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
(v1) Reviewed-by: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;

(v2) Refine amdgpu_flip_work_func() for better efficiency.

     In amdgpu_flip_work_func, replace the busy waiting udelay(5)
     with event lock held by a more performance and energy efficient
     usleep_range() until at least predicted true start of hw vblank,
     with some slack for scheduler happiness. Release the event lock
     during waits to not delay other outputs in doing their stuff, as
     the waiting can last up to 200 usecs in some cases.

     Also small fix to code comment and formatting in that function.

(v2) Signed-off-by: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;

(v3) Fix crash in crtc disabled case
</content>
</entry>
<entry>
<title>drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()</title>
<updated>2015-11-24T10:47:38Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2015-11-11T17:11:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1eb83451ba55d7a8c82b76b1591894ff2d4a95f2'/>
<id>urn:sha1:1eb83451ba55d7a8c82b76b1591894ff2d4a95f2</id>
<content type='text'>
Drivers shouldn't clobber the passed in addfb ioctl parameters.
i915 was doing just that. To prevent it from happening again,
pass the struct around as const, starting all the way from
internal_framebuffer_create().

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>Merge commit '06d1ee32a4d25356a710b49d5e95dbdd68bdf505' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next</title>
<updated>2015-10-16T00:25:28Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2015-10-16T00:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48f87dd146a480c723774962eca675873a8aa1da'/>
<id>urn:sha1:48f87dd146a480c723774962eca675873a8aa1da</id>
<content type='text'>
Backmerge the drm-fixes pull from Linus's tree into drm-next.

This is to fix some conflicts and make future pulls cleaner
</content>
</entry>
</feed>
