<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_fourcc.c, branch v5.1.10</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.1.10</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.1.10'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-02-08T21:17:08+00:00</updated>
<entry>
<title>drm/fourcc: Add new P010, P016 video format</title>
<updated>2019-02-08T21:17:08+00:00</updated>
<author>
<name>Randy Li</name>
<email>ayaka@soulik.info</email>
</author>
<published>2019-01-09T19:57:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05f8bc82fc428dbaf41764e95167dd759769f33d'/>
<id>urn:sha1:05f8bc82fc428dbaf41764e95167dd759769f33d</id>
<content type='text'>
P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits per
channel video format.

P012 is a planar 4:2:0 YUV 12 bits per channel

P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits per
channel video format.

V3: Added P012 and fixed cpp for P010.
V4: format definition refined per review.
V5: Format comment block for each new pixel format.
V6: reversed Cb/Cr order in comments.
v7: reversed Cb/Cr order in comments of header files, remove
the wrong part of commit message.
V8: reversed V7 changes except commit message and rebased.
v9: used the new properties to describe those format and
rebased.

Cc: Daniel Stone &lt;daniel@fooishbar.org&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;

Signed-off-by: Randy Li &lt;ayaka@soulik.info&gt;
Signed-off-by: Clint Taylor &lt;clinton.a.taylor@intel.com&gt;
Reviewed-by: Ayan Kumar Halder &lt;ayan.halder@arm.com&gt;
Reviewed-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190109195710.28501-2-ayaka@soulik.info
</content>
</entry>
<entry>
<title>drm: Introduce new DRM_FORMAT_XYUV</title>
<updated>2018-11-20T14:20:13+00:00</updated>
<author>
<name>Stanislav Lisovskiy</name>
<email>stanislav.lisovskiy@intel.com</email>
</author>
<published>2018-11-09T09:39:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61e49394a31aee438e026e553a1422e13e0309d9'/>
<id>urn:sha1:61e49394a31aee438e026e553a1422e13e0309d9</id>
<content type='text'>
v5: This is YUV444 packed format same as AYUV, but without alpha,
    as supported by i915.

v6: Removed unneeded initializer for new XYUV format.

v7: Added is_yuv field initialization according to latest
    drm_fourcc format structure initialization changes.

v8: Edited commit message to be more clear about skl+, renamed
    PLANE_CTL_FORMAT_AYUV to PLANE_CTL_FORMAT_XYUV as this format
    doesn't support per-pixel alpha. Fixed minor code issues.

v9: Moved DRM format check to proper place in intel_framebuffer_init.

v10: Changed DRM_FORMAT_XYUV to be DRM_FORMAT_XYUV8888

v11: Fixed rebase conflict, caused by added new formats to drm-tip
     meanwhile.

Reviewed-by: Alexandru Gheorghe &lt;alexandru-cosmin.gheorghe@arm.com&gt;
Signed-off-by: Stanislav Lisovskiy &lt;stanislav.lisovskiy@intel.com&gt;
[vsyrjala: Removed stray tab and sorted the formats differently]
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181109093916.25858-2-stanislav.lisovskiy@intel.com
</content>
</entry>
<entry>
<title>drm/fourcc: Add fourcc for Mali linear tiled formats</title>
<updated>2018-11-02T09:55:44+00:00</updated>
<author>
<name>Alexandru Gheorghe</name>
<email>alexandru-cosmin.gheorghe@arm.com</email>
</author>
<published>2018-11-01T15:11:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=697b6b85042ef0fb9838e3100700eed727c211e9'/>
<id>urn:sha1:697b6b85042ef0fb9838e3100700eed727c211e9</id>
<content type='text'>
Mali-DP implements a number of tiled yuv formats which are not
currently described in drm_fourcc.h.
This adds those definitions and describes their memory layout by
using the newly added char_per_block, block_w, block_h.

Reviewed-by: Brian Starkey &lt;brian.starkey@arm.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Alexandru Gheorghe &lt;alexandru-cosmin.gheorghe@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181101151051.1509-3-alexandru-cosmin.gheorghe@arm.com
</content>
</entry>
<entry>
<title>drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info</title>
<updated>2018-11-02T09:55:27+00:00</updated>
<author>
<name>Alexandru Gheorghe</name>
<email>alexandru-cosmin.gheorghe@arm.com</email>
</author>
<published>2018-11-01T17:02:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=042bf753842ddbddcf3d4c29f21a8905d6a33e79'/>
<id>urn:sha1:042bf753842ddbddcf3d4c29f21a8905d6a33e79</id>
<content type='text'>
For some pixel formats .cpp structure in drm_format info it's not
enough to describe the peculiarities of the pixel layout, for example
tiled formats or packed formats at bit level.

What's implemented here is to add three new members to drm_format_info
that could describe such formats:

- char_per_block[3]
- block_w[3]
- block_h[3]

char_per_block will be put in a union alongside cpp, for transparent
compatibility  with the existing format descriptions.

Regarding, block_w and block_h they are intended to be used through
their equivalent getters drm_format_info_block_width /
drm_format_info_block_height, the reason of the getters is to abstract
the fact that for normal formats block_w and block_h will be unset/0,
but the methods will be returning 1.

Additionally, convenience function drm_format_info_min_pitch had been
added that computes the minimum required pitch for a given pixel
format and buffer width.

Using that the following drm core functions had been updated to
generically handle both block and non-block formats:

- drm_fb_cma_get_gem_addr: for block formats it will just return the
  beginning of the block.
- framebuffer_check: Use the newly added drm_format_info_min_pitch.
- drm_gem_fb_create_with_funcs: Use the newly added
  drm_format_info_min_pitch.
- In places where is not expecting to handle block formats, like fbdev
  helpers I just added some warnings in case the block width/height
  are greater than 1.

Changes since v3:
 - Add helper function for computing the minimum required pitch.
 - Improve/cleanup documentation

Changes since v8:
 - Fixed build on 32bits arm architectures, with:

-       return DIV_ROUND_UP((u64)buffer_width * info-&gt;char_per_block[plane],
+       return DIV_ROUND_UP_ULL((u64)buffer_width * info-&gt;char_per_block[plane],

Reviewed-by: Brian Starkey &lt;brian.starkey@arm.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Alexandru Gheorghe &lt;alexandru-cosmin.gheorghe@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181101170055.5433-1-alexandru-cosmin.gheorghe@arm.com
</content>
</entry>
<entry>
<title>drm/doc: fix drm_driver_legacy_fb_format</title>
<updated>2018-10-05T16:05:32+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-10-04T20:24:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4af67def3b0830361cc4404f65e32efa0da9c9d7'/>
<id>urn:sha1:4af67def3b0830361cc4404f65e32efa0da9c9d7</id>
<content type='text'>
Didn't get updated in a rework of the original patch.

Fixes: 059b5eb5d955 ("drm: move native byte order quirk to new drm_driver_legacy_fb_format function")
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-20-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: move quirk_addfb_prefer_xbgr_30bpp handling to drm_driver_legacy_fb_format too</title>
<updated>2018-09-25T12:49:50+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-21T13:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:49+00:00</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-09-21T13:46:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl</title>
<updated>2018-09-06T07:07:41+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2018-09-05T15:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv</title>
<updated>2018-07-18T15:56:45+00:00</updated>
<author>
<name>Ayan Kumar Halder</name>
<email>ayan.halder@arm.com</email>
</author>
<published>2018-07-17T17:13:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce2d54619a10780a0d354e10d4c83ae4fad46f41'/>
<id>urn:sha1:ce2d54619a10780a0d354e10d4c83ae4fad46f41</id>
<content type='text'>
A lot of drivers duplicate the function to check if a format is yuv or not.
If we add a field (to denote whether the format is yuv or not) in the
drm_format_info table, all the drivers can use this field and it will
prevent duplication of similar logic.

Signed-off-by: Ayan Kumar halder &lt;ayan.halder@arm.com&gt;
Reviewed-by: Ville Syrjala &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1531847626-22248-1-git-send-email-ayan.halder@arm.com
</content>
</entry>
<entry>
<title>drm/fourcc: Add a alpha field to drm_format_info</title>
<updated>2018-01-29T11:07:47+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2017-12-22T14:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4cc4e1b40f3ff5227c9f326542b75947b464a635'/>
<id>urn:sha1:4cc4e1b40f3ff5227c9f326542b75947b464a635</id>
<content type='text'>
There's a bunch of drivers that duplicate the same function to know if a
particular format embeds an alpha component or not.

Let's create a field in the drm_format_info to avoid duplicating that logic
and looking up formats all the time.

Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Inki Dae &lt;inki.dae@samsung.com&gt;
Cc: Joonyoung Shim &lt;jy0922.shim@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Mark Yao &lt;mark.yao@rock-chips.com&gt;
Cc: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/9cd9951d147ff810c1f6f68d79e7983361ed6b68.1516617243.git-series.maxime.ripard@free-electrons.com
</content>
</entry>
</feed>
