<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/drm_framebuffer.c, branch v4.20</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.20</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.20'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-09-25T12:49:50Z</updated>
<entry>
<title>drm: move quirk_addfb_prefer_xbgr_30bpp handling to drm_driver_legacy_fb_format too</title>
<updated>2018-09-25T12:49:50Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-21T13:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9dd3cb243ddfc1408f373bf17b03aa0e2a7784c9'/>
<id>urn:sha1:9dd3cb243ddfc1408f373bf17b03aa0e2a7784c9</id>
<content type='text'>
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-7-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm: move native byte order quirk to new drm_driver_legacy_fb_format function</title>
<updated>2018-09-25T12:49:49Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-21T13:46:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=059b5eb5d9554dea689430ad3872dcb37a35053d'/>
<id>urn:sha1:059b5eb5d9554dea689430ad3872dcb37a35053d</id>
<content type='text'>
Turns out we need the pixel format fixup not only for the addfb ioctl,
but also for fbdev emulation code.

Ideally we would place it in drm_mode_legacy_fb_format().  That would
create alot of churn though, and most drivers don't care because they
never ever run on a big endian platform.  So add a new
drm_driver_legacy_fb_format() function instead which looks at the
mode_config-&gt;quirk_addfb_prefer_host_byte_order flag.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-2-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm: Differentiate the lack of an interface from invalid parameter</title>
<updated>2018-09-14T16:29:47Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-09-13T19:20:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69fdf4206a8ba91a277b3d50a3a05b71247635b2'/>
<id>urn:sha1:69fdf4206a8ba91a277b3d50a3a05b71247635b2</id>
<content type='text'>
If the ioctl is not supported on a particular piece of HW/driver
combination, report ENOTSUP (aka EOPNOTSUPP) so that it can be easily
distinguished from both the lack of the ioctl and from a regular invalid
parameter.

v2: Across all the kms ioctls we had a mixture of reporting EINVAL,
ENODEV and a few ENOTSUPP (most where EINVAL) for a failed
drm_core_check_feature(). Update everybody to report ENOTSUPP.

v3: ENOTSUPP is an internal errno! It's value (524) does not correspond
to a POSIX errno, the one we want is ENOTSUP. However,
uapi/asm-generic/errno.h doesn't include ENOTSUP but man errno says

	"ENOTSUP and EOPNOTSUPP have the same value on Linux,
	but according to POSIX.1 these error values should be
	distinct."

so use EOPNOTSUPP as its equivalent.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt; #v2
Link: https://patchwork.freedesktop.org/patch/msgid/20180913192050.24812-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm: refuse ADDFB2 ioctl for broken bigendian drivers</title>
<updated>2018-09-10T05:10:36Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-07T07:32:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eae06120f1974e1a4cab0f80f4b07d27eb80ab32'/>
<id>urn:sha1:eae06120f1974e1a4cab0f80f4b07d27eb80ab32</id>
<content type='text'>
Drivers must set the quirk_addfb_prefer_host_byte_order quirk to make
the drm_mode_addfb() compat code work correctly on bigendian machines.

If they don't they interpret pixel_format values incorrectly for bug
compatibility, which in turn implies the ADDFB2 ioctl does not work
correctly then.  So block it to make userspace fallback to ADDFB.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180907073213.20410-1-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm: extract drm_atomic_uapi.c</title>
<updated>2018-09-09T12:19:18Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-09-05T13:57:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=72fdb40c1a4b48f5fa6f6083ea7419b94639ed57'/>
<id>urn:sha1:72fdb40c1a4b48f5fa6f6083ea7419b94639ed57</id>
<content type='text'>
This leaves all the commit/check and state handling in drm_atomic.c,
while pulling all the uapi glue and the huge ioctl itself into a
seprate file.

This seems to almost perfectly split the rather big drm_atomic.c file
into 2 equal sizes.

Also adjust the kerneldoc and type a very terse overview text.

v2: Rebase.

v3: Fix tiny typo.

v4:
- Fixup armada, newly converted atomic driver hooray!
- Fixup msm/dpu1, newly added too.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Cc: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: intel-gfx@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Acked-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180905135711.28370-7-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl</title>
<updated>2018-09-06T07:07:41Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-09-05T15:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70109354fed232dfce8fb2c7cadf635acbe03e19'/>
<id>urn:sha1:70109354fed232dfce8fb2c7cadf635acbe03e19</id>
<content type='text'>
Since this is handling user provided bpp and depth, we need to sanity
check and propagate the EINVAL back rather than assume what the insane
client intended and fill the logs with DRM_ERROR.

v2: Check both bpp and depth match the builtin pixel format, and
introduce a canonical DRM_FORMAT_INVALID to reserve 0 against any future
fourcc.

v3: Mark up DRM_FORMAT_C8 as being {bpp:8, depth:8}

Testcase: igt/kms_addfb_basic/legacy-format
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180905153116.28924-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm: fix drm_mode_addfb() on big endian machines.</title>
<updated>2018-09-06T06:40:19Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-05T06:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6960e6da9cec3f6638121527c728305827ec12ab'/>
<id>urn:sha1:6960e6da9cec3f6638121527c728305827ec12ab</id>
<content type='text'>
Userspace on big endian machhines typically expects the ADDFB ioctl
returns a big endian framebuffer.  drm_mode_addfb() will call
drm_mode_addfb2() unconditionally with little endian DRM_FORMAT_*
values though, which is wrong.  This patch fixes that.

Drivers (both kernel and xorg) have quirks in place to deal with the
broken drm_mode_addfb() behavior.  Because of this we can't just change
drm_mode_addfb() behavior for everybody without breaking things.  Add
the quirk_addfb_prefer_host_byte_order field to mode_config, so drivers
can opt-in.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-5-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm: do not mask out DRM_FORMAT_BIG_ENDIAN</title>
<updated>2018-09-06T06:40:18Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-05T06:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=00409fd6f14f1a3f06c6ea50a6f2fba17c5573d9'/>
<id>urn:sha1:00409fd6f14f1a3f06c6ea50a6f2fba17c5573d9</id>
<content type='text'>
framebuffer_check() expects that drm_get_format_info() will not fail if
the __drm_format_info() call was successful.  That'll work only in case
both are called with the same pixel_format value, so masking out the
DRM_FORMAT_BIG_ENDIAN flag isn't a good idea.

Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-4-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm: replace DRIVER_PREFER_XBGR_30BPP driver flag with mode_config quirk</title>
<updated>2018-09-06T06:40:17Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-05T06:04:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e94043ee1d98d5112aa4e1d68733b0197dfdafa'/>
<id>urn:sha1:0e94043ee1d98d5112aa4e1d68733b0197dfdafa</id>
<content type='text'>
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-2-kraxel@redhat.com
</content>
</entry>
<entry>
<title>drm: Add drm_plane_mask()</title>
<updated>2018-07-02T15:45:55Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2018-06-26T19:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62f77ad0969594ee428043523bf28329df191b39'/>
<id>urn:sha1:62f77ad0969594ee428043523bf28329df191b39</id>
<content type='text'>
Add drm_plane_mask() which returns the 1&lt;&lt;index for the plane.
We already have an identical drm_crtc_mask() for crtcs.

Mostly performed with coccinelle:
@@
@@
- (1&lt;&lt;drm_plane_index(
+ drm_plane_mask(
  ...)
-  )

@@
@@
- 1&lt;&lt;drm_plane_index(
+ drm_plane_mask(
  ...)

@@
@@
- BIT(drm_plane_index(
+ drm_plane_mask(
  ...)
- )

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180626194716.12522-1-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi &lt;rodrigo.vivi@intel.com&gt;
</content>
</entry>
</feed>
