<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/radeon/r100.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-10-12T00:03:04Z</updated>
<entry>
<title>drm: Pass struct drm_file * to __drm_mode_object_find [v2]</title>
<updated>2017-10-12T00:03:04Z</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2017-03-15T06:25:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=418da17214aca5ef5f0b6f7588905ee7df92f98f'/>
<id>urn:sha1:418da17214aca5ef5f0b6f7588905ee7df92f98f</id>
<content type='text'>
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.

v2: Also fix up vboxvideo driver in staging

[airlied: merging early as this is an API change]

Suggested-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/radeon: fix typo in bandwidth calculation</title>
<updated>2017-04-07T16:20:41Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2017-03-29T22:03:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=211eed656b0ec13240aaaa42bd6541f1fcb61007'/>
<id>urn:sha1:211eed656b0ec13240aaaa42bd6541f1fcb61007</id>
<content type='text'>
The RV3xx settings were getting applied to all older asics
rather than just RV3xx.

Reported-by: David Binderman &lt;dcb314@hotmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>gpu: drm: amd/radeon: Convert printk(KERN_&lt;LEVEL&gt; to pr_&lt;level&gt;</title>
<updated>2017-03-30T03:53:24Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2017-02-28T12:55:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7ca85295d8cc280ea79cf6250c47363b7fd92f92'/>
<id>urn:sha1:7ca85295d8cc280ea79cf6250c47363b7fd92f92</id>
<content type='text'>
Use a more common logging style.

Miscellanea:

o Coalesce formats and realign arguments
o Neaten a few macros now using pr_&lt;level&gt;

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm: Nuke fb-&gt;bits_per_pixel</title>
<updated>2016-12-15T12:55:34Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-12-14T21:32:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=272725c7db4da1fd3229d944fc76d2e98e3a144e'/>
<id>urn:sha1:272725c7db4da1fd3229d944fc76d2e98e3a144e</id>
<content type='text'>
Replace uses of fb-&gt;bits_per_pixel with fb-&gt;format-&gt;cpp[0]*8.
Less duplicated information is a good thing.

Note that I didn't put parens around the cpp*8 in the below cocci script,
on account of not wanting spurious parens all over the place. Instead I
did the unsafe way, and tried to look over the entire diff to spot if
any dangerous expressions were produced. I didn't see any.

There are some cases where previously the code did X*bpp/8, so the
division happened after the multiplication. Those are now just X*cpp
so the division effectively happens before the multiplication,
but that is perfectly fine since bpp is always a multiple of 8.

@@
struct drm_framebuffer *FB;
expression E;
@@
 drm_helper_mode_fill_fb_struct(...) {
	...
-	FB-&gt;bits_per_pixel = E;
	...
 }

@@
struct drm_framebuffer *FB;
expression E;
@@
 i9xx_get_initial_plane_config(...) {
	...
-	FB-&gt;bits_per_pixel = E;
	...
 }

@@
struct drm_framebuffer *FB;
expression E;
@@
 ironlake_get_initial_plane_config(...) {
	...
-	FB-&gt;bits_per_pixel = E;
	...
 }

@@
struct drm_framebuffer *FB;
expression E;
@@
 skylake_get_initial_plane_config(...) {
	...
-	FB-&gt;bits_per_pixel = E;
	...
 }

@@
struct drm_framebuffer FB;
expression E;
@@
(
- E * FB.bits_per_pixel / 8
+ E * FB.format-&gt;cpp[0]
|
- FB.bits_per_pixel / 8
+ FB.format-&gt;cpp[0]
|
- E * FB.bits_per_pixel &gt;&gt; 3
+ E * FB.format-&gt;cpp[0]
|
- FB.bits_per_pixel &gt;&gt; 3
+ FB.format-&gt;cpp[0]
|
- (FB.bits_per_pixel + 7) / 8
+ FB.format-&gt;cpp[0]
|
- FB.bits_per_pixel
+ FB.format-&gt;cpp[0] * 8
|
- FB.format-&gt;cpp[0] * 8 != 8
+ FB.format-&gt;cpp[0] != 1
)

@@
struct drm_framebuffer *FB;
expression E;
@@
(
- E * FB-&gt;bits_per_pixel / 8
+ E * FB-&gt;format-&gt;cpp[0]
|
- FB-&gt;bits_per_pixel / 8
+ FB-&gt;format-&gt;cpp[0]
|
- E * FB-&gt;bits_per_pixel &gt;&gt; 3
+ E * FB-&gt;format-&gt;cpp[0]
|
- FB-&gt;bits_per_pixel &gt;&gt; 3
+ FB-&gt;format-&gt;cpp[0]
|
- (FB-&gt;bits_per_pixel + 7) / 8
+ FB-&gt;format-&gt;cpp[0]
|
- FB-&gt;bits_per_pixel
+ FB-&gt;format-&gt;cpp[0] * 8
|
- FB-&gt;format-&gt;cpp[0] * 8 != 8
+ FB-&gt;format-&gt;cpp[0] != 1
)

@@
struct drm_plane_state *state;
expression E;
@@
(
- E * state-&gt;fb-&gt;bits_per_pixel / 8
+ E * state-&gt;fb-&gt;format-&gt;cpp[0]
|
- state-&gt;fb-&gt;bits_per_pixel / 8
+ state-&gt;fb-&gt;format-&gt;cpp[0]
|
- E * state-&gt;fb-&gt;bits_per_pixel &gt;&gt; 3
+ E * state-&gt;fb-&gt;format-&gt;cpp[0]
|
- state-&gt;fb-&gt;bits_per_pixel &gt;&gt; 3
+ state-&gt;fb-&gt;format-&gt;cpp[0]
|
- (state-&gt;fb-&gt;bits_per_pixel + 7) / 8
+ state-&gt;fb-&gt;format-&gt;cpp[0]
|
- state-&gt;fb-&gt;bits_per_pixel
+ state-&gt;fb-&gt;format-&gt;cpp[0] * 8
|
- state-&gt;fb-&gt;format-&gt;cpp[0] * 8 != 8
+ state-&gt;fb-&gt;format-&gt;cpp[0] != 1
)

@@
@@
- (8 * 8)
+ 8 * 8

@@
struct drm_framebuffer FB;
@@
- (FB.format-&gt;cpp[0])
+ FB.format-&gt;cpp[0]

@@
struct drm_framebuffer *FB;
@@
- (FB-&gt;format-&gt;cpp[0])
+ FB-&gt;format-&gt;cpp[0]

@@
@@
 struct drm_framebuffer {
	 ...
-	 int bits_per_pixel;
	 ...
 };

v2: Clean up the 'cpp*8 != 8' and '(8 * 8)' cases (Laurent)
v3: Adjusted the semantic patch a bit and regenerated due to code
    changes

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt; (v1)
Link: http://patchwork.freedesktop.org/patch/msgid/1481751140-18352-1-git-send-email-ville.syrjala@linux.intel.com
</content>
</entry>
<entry>
<title>drm/radeon: Add local 'fb' variables</title>
<updated>2016-12-14T20:36:05Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-11-18T19:52:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=489f32677751b97252c1788c8702da40584364be'/>
<id>urn:sha1:489f32677751b97252c1788c8702da40584364be</id>
<content type='text'>
Add a local 'fb' variable to a few places to get rid of the
'crtc-&gt;primary-&gt;fb' stuff. Looks neater and helps me with my poor
coccinelle skills later.

Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-3-git-send-email-ville.syrjala@linux.intel.com
</content>
</entry>
<entry>
<title>drm/radeon: squash lines for simple wrapper functions</title>
<updated>2016-09-15T14:39:37Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2016-09-14T14:39:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0003b8d222879deb469c9dbf1c7961bdf81ec1d7'/>
<id>urn:sha1:0003b8d222879deb469c9dbf1c7961bdf81ec1d7</id>
<content type='text'>
Remove unneeded variables and assignments.

Reviewed-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-3-git-send-email-yamada.masahiro@socionext.com
</content>
</entry>
<entry>
<title>drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC</title>
<updated>2016-05-05T00:19:03Z</updated>
<author>
<name>Michel Dänzer</name>
<email>michel.daenzer@amd.com</email>
</author>
<published>2016-04-01T09:51:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c63dd758589b1f7e8398841d1f443f06ebfbcefc'/>
<id>urn:sha1:c63dd758589b1f7e8398841d1f443f06ebfbcefc</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).

Currently this is only supported on ASICs which have a page flip
completion interrupt (&gt;= R600), and only if the use_pflipirq parameter
has value 2 (the default).

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-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/radeon: don't include RADEON_HPD_NONE in HPD IRQ enable bitsets</title>
<updated>2016-05-02T19:25:40Z</updated>
<author>
<name>Nicolai Stange</name>
<email>nicstange@gmail.com</email>
</author>
<published>2016-03-22T21:05:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b2c0cbd657173f024138d6421774007690ceeffd'/>
<id>urn:sha1:b2c0cbd657173f024138d6421774007690ceeffd</id>
<content type='text'>
The values of all but the RADEON_HPD_NONE members of the radeon_hpd_id
enum transform 1:1 into bit positions within the 'enabled' bitset as
assembled by evergreen_hpd_init():

  enabled |= 1 &lt;&lt; radeon_connector-&gt;hpd.hpd;

However, if -&gt;hpd.hpd happens to equal RADEON_HPD_NONE == 0xff, UBSAN
reports

  UBSAN: Undefined behaviour in drivers/gpu/drm/radeon/evergreen.c:1867:16
  shift exponent 255 is too large for 32-bit type 'int'
  [...]
  Call Trace:
   [&lt;ffffffff818c4d35&gt;] dump_stack+0xbc/0x117
   [&lt;ffffffff818c4c79&gt;] ? _atomic_dec_and_lock+0x169/0x169
   [&lt;ffffffff819411bb&gt;] ubsan_epilogue+0xd/0x4e
   [&lt;ffffffff81941cbc&gt;] __ubsan_handle_shift_out_of_bounds+0x1fb/0x254
   [&lt;ffffffffa0ba7f2e&gt;] ? atom_execute_table+0x3e/0x50 [radeon]
   [&lt;ffffffff81941ac1&gt;] ? __ubsan_handle_load_invalid_value+0x158/0x158
   [&lt;ffffffffa0b87700&gt;] ? radeon_get_pll_use_mask+0x130/0x130 [radeon]
   [&lt;ffffffff81219930&gt;] ? wake_up_klogd_work_func+0x60/0x60
   [&lt;ffffffff8121a35e&gt;] ? vprintk_default+0x3e/0x60
   [&lt;ffffffffa0c603c4&gt;] evergreen_hpd_init+0x274/0x2d0 [radeon]
   [&lt;ffffffffa0c603c4&gt;] ? evergreen_hpd_init+0x274/0x2d0 [radeon]
   [&lt;ffffffffa0bd196e&gt;] radeon_modeset_init+0x8ce/0x18d0 [radeon]
   [&lt;ffffffffa0b71d86&gt;] radeon_driver_load_kms+0x186/0x350 [radeon]
   [&lt;ffffffffa03b6b16&gt;] drm_dev_register+0xc6/0x100 [drm]
   [&lt;ffffffffa03bc8c4&gt;] drm_get_pci_dev+0xe4/0x490 [drm]
   [&lt;ffffffff814b83f0&gt;] ? kfree+0x220/0x370
   [&lt;ffffffffa0b687c2&gt;] radeon_pci_probe+0x112/0x140 [radeon]
   [...]
  =====================================================================
  radeon 0000:01:00.0: No connectors reported connected with modes

At least on x86, there should be no user-visible impact as there

  1 &lt;&lt; 0xff == 1 &lt;&lt; (0xff &amp; 31) == 1 &lt;&lt; 31

holds and 31 &gt; RADEON_MAX_HPD_PINS. Thus, this patch is a cosmetic one.

All of the above applies analogously to evergreen_hpd_fini(),
r100_hpd_init(), r100_hpd_fini(), r600_hpd_init(), r600_hpd_fini(),
rs600_hpd_init() and rs600_hpd_fini()

Silence UBSAN by checking -&gt;hpd.hpd for RADEON_HPD_NONE before oring it
into the 'enabled' bitset in the *_init()- or the 'disabled' bitset in
the *_fini()-functions respectively.

Signed-off-by: Nicolai Stange &lt;nicstange@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/radeon: allow to force hard GPU reset.</title>
<updated>2016-05-02T17:08:54Z</updated>
<author>
<name>Jérome Glisse</name>
<email>jglisse@redhat.com</email>
</author>
<published>2016-03-18T15:58:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=71fe289970430fca85c7c8da5a829e65764e081b'/>
<id>urn:sha1:71fe289970430fca85c7c8da5a829e65764e081b</id>
<content type='text'>
In some cases, like when freezing for hibernation, we need to be
able to force hard reset even if no engine are stuck. This patch
add a bool option to current asic reset callback to allow to force
hard reset on asic that supports it.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/radeon: Avoid double gpu reset by adding a timeout on IB ring tests.</title>
<updated>2016-02-10T19:17:15Z</updated>
<author>
<name>Matthew Dawson</name>
<email>matthew@mjdsystems.ca</email>
</author>
<published>2016-02-07T21:51:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=04db4caf5c836c211977a54c9218f2cdee14897f'/>
<id>urn:sha1:04db4caf5c836c211977a54c9218f2cdee14897f</id>
<content type='text'>
When the radeon driver resets a gpu, it attempts to test whether all the
rings can successfully handle an IB.  If these rings fail to respond, the
process will wait forever.  Another gpu reset can't happen at this point,
as the current reset holds a lock required to do so.  Instead, make all
the IB tests run with a timeout, so the system can attempt to recover
in this case.

While this doesn't fix the underlying issue with card resets failing, it
gives the system a higher chance of recovering.  These timeouts have been
confirmed to help both a Tathi and Hawaii card recover after a gpu reset.

This also adds a new function, radeon_fence_wait_timeout, that behaves like
fence_wait_timeout.  It is used instead of fence_wait_timeout as it continues
to work during a reset.  radeon_fence_wait is changed to be implemented
using this function.

V2:
 - Changed the timeout to 1s, as the default 10s from radeon_wait_timeout was
too long.  A timeout of 100ms was tested and found to be too short.
 - Changed radeon_fence_wait_timeout to behave more like fence_wait_timeout.

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