<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c, 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-17T06:47:30Z</updated>
<entry>
<title>drm: Remove unused drm_device from drm_gem_object_lookup()</title>
<updated>2016-05-17T06:47:30Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2016-05-09T10:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8ad0bd84f986072314595d05444719fdf29e412'/>
<id>urn:sha1:a8ad0bd84f986072314595d05444719fdf29e412</id>
<content type='text'>
drm_gem_object_lookup() has never required the drm_device for its file
local translation of the user handle to the GEM object. Let's remove the
unused parameter and save some space.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
[danvet: Fixup kerneldoc too.]
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<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: Mark some tables as const</title>
<updated>2016-05-05T00:20:00Z</updated>
<author>
<name>Nils Wallménius</name>
<email>nils.wallmenius@gmail.com</email>
</author>
<published>2016-04-10T14:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f498d9ed26fdfa2694ef3d892f032c7dc6feba14'/>
<id>urn:sha1:f498d9ed26fdfa2694ef3d892f032c7dc6feba14</id>
<content type='text'>
This patch marks some compile-time constant tables 'const'.
The tables marked in this patch are the low hanging fruit
where little other changes were necesary to avoid casting
away constness etc. Also mark some tables that are private
to a file as static.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Nils Wallménius &lt;nils.wallmenius@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Set PFLIP_SUBMITTED for crtc after address update</title>
<updated>2016-05-05T00:19:07Z</updated>
<author>
<name>Andrey Grodzovsky</name>
<email>Andrey.Grodzovsky@amd.com</email>
</author>
<published>2016-03-30T21:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd4c72d1e9dd7efdb9a990225f32e0130c0884af'/>
<id>urn:sha1:bd4c72d1e9dd7efdb9a990225f32e0130c0884af</id>
<content type='text'>
Also add some pflip debug prints.

This change allows us to wait on pflip status until the new surface address
is actually submitted to the register.

This reverts ed3020e923240829dcdfd3343f6e91dc02c63775
drm/amdgpu: Move MMIO flip out of spinlocked region
The original change assumed DAL will aquire locks inside DAL
implemetion of page_flip callback which eventaully didn't happen.

This moves the flip before status update which makes sense for the
non-DAL code pathes as well.

Signed-off-by: Andrey Grodzovsky &lt;Andrey.Grodzovsky@amd.com&gt;
Reviewed-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: fix leaking fence in the pageflip code</title>
<updated>2016-04-01T14:08:38Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2016-03-31T11:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab7e9c137a85cf942c720498501d29719e61160c'/>
<id>urn:sha1:ab7e9c137a85cf942c720498501d29719e61160c</id>
<content type='text'>
This fixes a memory leak when we can't register the callback on a fence.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>Merge drm-fixes into drm-next.</title>
<updated>2016-03-13T23:46:02Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2016-03-13T23:42:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b61c0fcdf0cfd20a85d9856d46142e7f297de0a'/>
<id>urn:sha1:9b61c0fcdf0cfd20a85d9856d46142e7f297de0a</id>
<content type='text'>
Nouveau wanted this to avoid some worse conflicts when I merge that.
</content>
</entry>
<entry>
<title>drm/amdgpu: Fix error handling in amdgpu_flip_work_func.</title>
<updated>2016-03-05T17:31:45Z</updated>
<author>
<name>Mario Kleiner</name>
<email>mario.kleiner.de@gmail.com</email>
</author>
<published>2016-03-01T20:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=90e94b160c7f647ddffda707f5e3c0c66c170df8'/>
<id>urn:sha1:90e94b160c7f647ddffda707f5e3c0c66c170df8</id>
<content type='text'>
The patch e1d09dc0ccc6: "drm/amdgpu: Don't hang in
amdgpu_flip_work_func on disabled crtc." from Feb 19, 2016, leads to
the following static checker warning, as reported by Dan Carpenter in
https://lists.freedesktop.org/archives/dri-devel/2016-February/101987.html

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:127 amdgpu_flip_work_func()	warn: should this be 'repcnt == -1'
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'spin_lock:&amp;crtc-&gt;dev-&gt;event_lock'
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'irqsave:flags'

This patch fixes both reported problems:

Change post-decrement of repcnt to pre-decrement, so
it can't underflow anymore, but still performs up to
three repetitions - three is the maximum one could
expect in practice.

Move the spin_unlock_irqrestore to where it actually
belongs.

Reviewed-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 4.4+
Cc: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Cc: 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: Don't hang in amdgpu_flip_work_func on disabled crtc.</title>
<updated>2016-02-19T23:15:30Z</updated>
<author>
<name>Mario Kleiner</name>
<email>mario.kleiner.de@gmail.com</email>
</author>
<published>2016-02-19T01:06:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1d09dc0ccc6c91e3916476f636edb76da1f65bb'/>
<id>urn:sha1:e1d09dc0ccc6c91e3916476f636edb76da1f65bb</id>
<content type='text'>
This fixes a regression introduced in Linux 4.4.

This is a port of the same fix for radeon-kms in the
patch "drm/radeon: Don't hang in radeon_flip_work_func
on disabled crtc. (v2)"

Limit the amount of time amdgpu_flip_work_func can
delay programming a page flip, by both limiting the
maximum amount of time per wait cycle and the maximum
number of wait cycles. Continue the flip if the limit
is exceeded, even if that may result in a visual or
timing glitch.

This is to prevent a hang of page flips, as reported
in fdo bug #93746: Disconnecting a DisplayPort display
in parallel to a kms pageflip getting queued can cause
the following hang of page flips and thereby an unusable
desktop:

1. kms pageflip ioctl() queues pageflip -&gt; queues execution
   of amdgpu_flip_work_func.

2. Hotunplug of display causes the driver to DPMS OFF
   the unplugged display. Display engine shuts down,
   scanout no longer moves, but stays at its resting
   position at start line of vblank.

3. amdgpu_flip_work_func executes while crtc is off, and
   due to the non-moving scanout position, the new flip
   delay code introduced into Linux 4.4 by
   commit 8e36f9d33c13 ("drm/amdgpu: Fixup hw vblank counter/ts..")
   enters an infinite wait loop.

4. After reconnecting the display, the pageflip continues
   to hang in 3. and the display doesn't update its view
   of the desktop.

This patch fixes the Linux 4.4 regression from fdo bug #93746

&lt;https://bugs.freedesktop.org/show_bug.cgi?id=93746&gt;

Reported-by: Bernd Steinhauser &lt;linux@bernd-steinhauser.de&gt;
Signed-off-by: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;

Cc: &lt;stable@vger.kernel.org&gt; # 4.4+
Cc: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
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/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/amdgpu: stop blocking for page filp fences</title>
<updated>2016-02-16T22:24:07Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2016-02-11T14:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3874b758ad52708ffdbab3e7c58e70167ce5024'/>
<id>urn:sha1:c3874b758ad52708ffdbab3e7c58e70167ce5024</id>
<content type='text'>
Just register an callback and reschedule the work item if necessary.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
</feed>
