<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/gpu/drm/drm_framebuffer.c, branch v4.11-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Revert "drm: Resurrect atomic rmfb code, v3"</title>
<updated>2017-02-17T02:39:04+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2017-02-17T02:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9ca70356a9260403c1bda40d942935e55d00c11c'/>
<id>9ca70356a9260403c1bda40d942935e55d00c11c</id>
<content type='text'>
This reverts commit 1592364de3912dad264262f4bcc61552984c9523.

This apparantly causes some regressions so pull it out for now.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1592364de3912dad264262f4bcc61552984c9523.

This apparantly causes some regressions so pull it out for now.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Resurrect atomic rmfb code, v3</title>
<updated>2017-02-15T13:40:57+00:00</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2017-01-25T11:30:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1592364de3912dad264262f4bcc61552984c9523'/>
<id>1592364de3912dad264262f4bcc61552984c9523</id>
<content type='text'>
This was somehow lost between v3 and the merged version in Maarten's
patch merged as:

commit f2d580b9a8149735cbc4b59c4a8df60173658140
Author: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Date:   Wed May 4 14:38:26 2016 +0200

    drm/core: Do not preserve framebuffer on rmfb, v4.

This introduces a slight behavioral change to rmfb. Instead of
disabling a crtc when the primary plane is disabled, we try to
preserve it.

Apart from old versions of the vmwgfx xorg driver, there is
nothing depending on rmfb disabling a crtc. Since vmwgfx is
a legacy driver we can safely only disable the plane with atomic.

If this commit is rejected by the driver then we will still fall
back to the old behavior and turn off the crtc.

v2:
- Remove plane-&gt;fb assignment, done by drm_atomic_clean_old_fb.
- Add WARN_ON when atomic_remove_fb fails.
- Always call drm_atomic_state_put.
v3:
- Use drm_drv_uses_atomic_modeset
- Handle the case where the first plane-disable-only commit fails
  with -EINVAL. Some drivers do not support this, fall back to
  disabling all crtc's in this case.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/66fc3da5-697b-1613-0a67-a5293209f0dc@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was somehow lost between v3 and the merged version in Maarten's
patch merged as:

commit f2d580b9a8149735cbc4b59c4a8df60173658140
Author: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Date:   Wed May 4 14:38:26 2016 +0200

    drm/core: Do not preserve framebuffer on rmfb, v4.

This introduces a slight behavioral change to rmfb. Instead of
disabling a crtc when the primary plane is disabled, we try to
preserve it.

Apart from old versions of the vmwgfx xorg driver, there is
nothing depending on rmfb disabling a crtc. Since vmwgfx is
a legacy driver we can safely only disable the plane with atomic.

If this commit is rejected by the driver then we will still fall
back to the old behavior and turn off the crtc.

v2:
- Remove plane-&gt;fb assignment, done by drm_atomic_clean_old_fb.
- Add WARN_ON when atomic_remove_fb fails.
- Always call drm_atomic_state_put.
v3:
- Use drm_drv_uses_atomic_modeset
- Handle the case where the first plane-disable-only commit fails
  with -EINVAL. Some drivers do not support this, fall back to
  disabling all crtc's in this case.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/66fc3da5-697b-1613-0a67-a5293209f0dc@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/kms-core: Use recommened kerneldoc for struct member refs</title>
<updated>2017-01-25T15:30:34+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-01-25T06:26:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d574528a64c3a3b2a9c6a125e2428b38bddbdf3c'/>
<id>d574528a64c3a3b2a9c6a125e2428b38bddbdf3c</id>
<content type='text'>
I just learned that &amp;struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).

Also some minor drive-by polish where it makes sense, I read a lot
of docs ...

v2: Review from Eric.

Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Eric Engestrom &lt;eric.engestrom@imgtec.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-4-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I just learned that &amp;struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).

Also some minor drive-by polish where it makes sense, I read a lot
of docs ...

v2: Review from Eric.

Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Eric Engestrom &lt;eric.engestrom@imgtec.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-4-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/doc: use preferred struct reference in kernel-doc</title>
<updated>2016-12-30T12:34:59+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-12-29T20:48:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ea0dd85a75f15174cc2bf75f805e378391995931'/>
<id>ea0dd85a75f15174cc2bf75f805e378391995931</id>
<content type='text'>
sed -e 's/\( \* .*\)struct &amp;\([_a-z]*\)/\1\&amp;struct \2/' -i

Originally I wasnt a friend of this style because I thought a
line-break between the "&amp;struct" and "foo" part would break it. But a
quick test shows that " * &amp;struct \n * foo\n" works pefectly well with
current kernel-doc. So time to mass-apply these changes!

Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-6-git-send-email-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sed -e 's/\( \* .*\)struct &amp;\([_a-z]*\)/\1\&amp;struct \2/' -i

Originally I wasnt a friend of this style because I thought a
line-break between the "&amp;struct" and "foo" part would break it. But a
quick test shows that " * &amp;struct \n * foo\n" works pefectly well with
current kernel-doc. So time to mass-apply these changes!

Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-6-git-send-email-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Nuke fb-&gt;bits_per_pixel</title>
<updated>2016-12-15T12:55:34+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-12-14T21:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=272725c7db4da1fd3229d944fc76d2e98e3a144e'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Nuke fb-&gt;depth</title>
<updated>2016-12-15T12:55:33+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-12-14T21:31:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b00c600e91531df00aaa551049382416c4db745d'/>
<id>b00c600e91531df00aaa551049382416c4db745d</id>
<content type='text'>
Replace uses of fb-&gt;depth with fb-&gt;format-&gt;depth. Less duplicate
information is a good thing.

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

@@
struct nouveau_framebuffer *fb;
@@
- fb-&gt;base.depth
+ fb-&gt;base.format-&gt;depth

@@
struct drm_framebuffer fb;
@@
- fb.depth
+ fb.format-&gt;depth

@@
struct drm_framebuffer *fb;
@@
- fb-&gt;depth
+ fb-&gt;format-&gt;depth

@@
struct drm_framebuffer fb;
@@
- (fb.format-&gt;depth)
+ fb.format-&gt;depth

@@
struct drm_framebuffer *fb;
@@
- (fb-&gt;format-&gt;depth)
+ fb-&gt;format-&gt;depth

@@
@@
 struct drm_framebuffer {
	 ...
-	 unsigned int depth;
	 ...
 };

v2: Drop the vmw stuff (Daniel)
    Rerun spatch 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;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1481751095-18249-1-git-send-email-ville.syrjala@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace uses of fb-&gt;depth with fb-&gt;format-&gt;depth. Less duplicate
information is a good thing.

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

@@
struct nouveau_framebuffer *fb;
@@
- fb-&gt;base.depth
+ fb-&gt;base.format-&gt;depth

@@
struct drm_framebuffer fb;
@@
- fb.depth
+ fb.format-&gt;depth

@@
struct drm_framebuffer *fb;
@@
- fb-&gt;depth
+ fb-&gt;format-&gt;depth

@@
struct drm_framebuffer fb;
@@
- (fb.format-&gt;depth)
+ fb.format-&gt;depth

@@
struct drm_framebuffer *fb;
@@
- (fb-&gt;format-&gt;depth)
+ fb-&gt;format-&gt;depth

@@
@@
 struct drm_framebuffer {
	 ...
-	 unsigned int depth;
	 ...
 };

v2: Drop the vmw stuff (Daniel)
    Rerun spatch 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;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1481751095-18249-1-git-send-email-ville.syrjala@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Add drm_framebuffer_plane_{width,height}()</title>
<updated>2016-12-15T12:55:33+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-11-18T19:53:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f8f6a6c3cbe14406780a90e89d7d8742493913c'/>
<id>8f8f6a6c3cbe14406780a90e89d7d8742493913c</id>
<content type='text'>
Add variants of drm_format_plane_{width,height}() that take an entire fb
object instead of just the format. These should be more efficent as they
can just look up the format info from the fb-&gt;format pointer rather than
having to look it up (using a linear search based on the format).

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-30-git-send-email-ville.syrjala@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add variants of drm_format_plane_{width,height}() that take an entire fb
object instead of just the format. These should be more efficent as they
can just look up the format info from the fb-&gt;format pointer rather than
having to look it up (using a linear search based on the format).

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-30-git-send-email-ville.syrjala@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Reject fbs w/o format info in drm_framebuffer_init()</title>
<updated>2016-12-15T12:55:30+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-11-18T19:52:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=570cec3244447f21f5b24c3a75151b4166e30d95'/>
<id>570cec3244447f21f5b24c3a75151b4166e30d95</id>
<content type='text'>
Any framebuffer that doesn't have proper format information when
drm_framebuffer_init() is called is a bug. Let's warn and return
an error to avoid oopsing the kernel later due to dereferencing the
NULL fb-&gt;format pointer.

Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Suggested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-23-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Any framebuffer that doesn't have proper format information when
drm_framebuffer_init() is called is a bug. Let's warn and return
an error to avoid oopsing the kernel later due to dereferencing the
NULL fb-&gt;format pointer.

Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Suggested-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-23-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Populate fb-&gt;dev from drm_helper_mode_fill_fb_struct()</title>
<updated>2016-12-15T12:55:29+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-11-18T19:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95bce76015819e546528c13fe25d31771427c9d5'/>
<id>95bce76015819e546528c13fe25d31771427c9d5</id>
<content type='text'>
Populating fb-&gt;dev before drm_framebuffer_init() allows us to use
fb-&gt;dev already while validating the framebuffer. Let's have
drm_helper_mode_fill_fb_struct() do that for us.

Also make drm_framebuffer_init() warn us if a different device
pointer is passed to it than was passed to
drm_helper_mode_fill_fb_struct().

v2: Reject fbs with invalid fb-&gt;dev (Laurent)

Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
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/1479498793-31021-19-git-send-email-ville.syrjala@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Populating fb-&gt;dev before drm_framebuffer_init() allows us to use
fb-&gt;dev already while validating the framebuffer. Let's have
drm_helper_mode_fill_fb_struct() do that for us.

Also make drm_framebuffer_init() warn us if a different device
pointer is passed to it than was passed to
drm_helper_mode_fill_fb_struct().

v2: Reject fbs with invalid fb-&gt;dev (Laurent)

Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
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/1479498793-31021-19-git-send-email-ville.syrjala@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Nuke modifier[1-3]</title>
<updated>2016-11-17T10:58:09+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2016-11-16T11:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bae781b259269590109e8a4a8227331362b88212'/>
<id>bae781b259269590109e8a4a8227331362b88212</id>
<content type='text'>
It has been suggested that having per-plane modifiers is making life
more difficult for userspace, so let's just retire modifier[1-3] and
use modifier[0] to apply to the entire framebuffer.

Obviosuly this means that if individual planes need different tiling
layouts and whatnot we will need a new modifier for each combination
of planes with different tiling layouts.

For a bit of extra backwards compatilbilty the kernel will allow
non-zero modifier[1+] but it require that they will match modifier[0].
This in case there's existing userspace out there that sets
modifier[1+] to something non-zero with planar formats.

Mostly a cocci job, with a bit of manual stuff mixed in.

@@
struct drm_framebuffer *fb;
expression E;
@@
- fb-&gt;modifier[E]
+ fb-&gt;modifier

@@
struct drm_framebuffer fb;
expression E;
@@
- fb.modifier[E]
+ fb.modifier

Cc: Kristian Høgsberg &lt;hoegsberg@gmail.com&gt;
Cc: Ben Widawsky &lt;benjamin.widawsky@intel.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Tomeu Vizoso &lt;tomeu@tomeuvizoso.net&gt;
Cc: dczaplejewicz@collabora.co.uk
Suggested-by: Kristian Høgsberg &lt;hoegsberg@gmail.com&gt;
Acked-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Acked-by: Daniel Stone &lt;daniels@collabora.com&gt;
Acked-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1479295996-26246-1-git-send-email-ville.syrjala@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It has been suggested that having per-plane modifiers is making life
more difficult for userspace, so let's just retire modifier[1-3] and
use modifier[0] to apply to the entire framebuffer.

Obviosuly this means that if individual planes need different tiling
layouts and whatnot we will need a new modifier for each combination
of planes with different tiling layouts.

For a bit of extra backwards compatilbilty the kernel will allow
non-zero modifier[1+] but it require that they will match modifier[0].
This in case there's existing userspace out there that sets
modifier[1+] to something non-zero with planar formats.

Mostly a cocci job, with a bit of manual stuff mixed in.

@@
struct drm_framebuffer *fb;
expression E;
@@
- fb-&gt;modifier[E]
+ fb-&gt;modifier

@@
struct drm_framebuffer fb;
expression E;
@@
- fb.modifier[E]
+ fb.modifier

Cc: Kristian Høgsberg &lt;hoegsberg@gmail.com&gt;
Cc: Ben Widawsky &lt;benjamin.widawsky@intel.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Tomeu Vizoso &lt;tomeu@tomeuvizoso.net&gt;
Cc: dczaplejewicz@collabora.co.uk
Suggested-by: Kristian Høgsberg &lt;hoegsberg@gmail.com&gt;
Acked-by: Ben Widawsky &lt;ben@bwidawsk.net&gt;
Acked-by: Daniel Stone &lt;daniels@collabora.com&gt;
Acked-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1479295996-26246-1-git-send-email-ville.syrjala@linux.intel.com
</pre>
</div>
</content>
</entry>
</feed>
