<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_fourcc.c, branch v5.10.257</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.257'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-03-11T15:39:29+00:00</updated>
<entry>
<title>drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats</title>
<updated>2023-03-11T15:39:29+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2022-11-23T16:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a86bd12bd974c20d0f045ac601f96ab0e8db0410'/>
<id>urn:sha1:a86bd12bd974c20d0f045ac601f96ab0e8db0410</id>
<content type='text'>
[ Upstream commit 6fb6c979ca628583d4d0c59a0f8ff977e581ecc0 ]

As of commit eae06120f1974e1a ("drm: refuse ADDFB2 ioctl for broken
bigendian drivers"), drivers must set the
quirk_addfb_prefer_host_byte_order quirk to make the drm_mode_addfb()
compat code work correctly on big-endian machines.

While that works fine for big-endian XRGB8888 and ARGB8888, which are
mapped to the existing little-endian BGRX8888 and BGRA8888 formats, it
does not work for big-endian XRGB1555 and RGB565, as the latter are not
listed in the format database.

Fix this by adding the missing formats.  Limit this to big-endian
platforms, as there is currently no need to support these formats on
little-endian platforms.

Fixes: 6960e6da9cec3f66 ("drm: fix drm_mode_addfb() on big endian machines.")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/3ee1f8144feb96c28742b22384189f1f83bcfc1a.1669221671.git.geert@linux-m68k.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/fourcc: Fix vsub/hsub for Q410 and Q401</title>
<updated>2023-01-14T09:15:29+00:00</updated>
<author>
<name>Brian Starkey</name>
<email>brian.starkey@arm.com</email>
</author>
<published>2022-09-13T14:43:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=102df01caf5ebf8948d00de1ae53fd730a454905'/>
<id>urn:sha1:102df01caf5ebf8948d00de1ae53fd730a454905</id>
<content type='text'>
[ Upstream commit b230555f3257f197dd98641ef6ebaf778b52dd51 ]

These formats are not subsampled, but that means hsub and vsub should be
1, not 0.

Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats")
Reported-by: George Kennedy &lt;george.kennedy@oracle.com&gt;
Reported-by: butt3rflyh4ck &lt;butterflyhuangxx@gmail.com&gt;
Signed-off-by: Brian Starkey &lt;brian.starkey@arm.com&gt;
Reviewed-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Signed-off-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220913144306.17279-1-brian.starkey@arm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/fourcc: Add packed 10bit YUV 4:2:0 format</title>
<updated>2023-01-14T09:15:29+00:00</updated>
<author>
<name>Dave Stevenson</name>
<email>dave.stevenson@raspberrypi.com</email>
</author>
<published>2021-12-15T09:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6f6a99fb620dc09e424986aa9c3492bb74a138bf'/>
<id>urn:sha1:6f6a99fb620dc09e424986aa9c3492bb74a138bf</id>
<content type='text'>
[ Upstream commit 006ea1b5822f9019bd722ffc6242bc0880879e3d ]

Adds a format that is 3 10bit YUV 4:2:0 samples packed into
a 32bit word (with 2 spare bits).

Supported on Broadcom BCM2711 chips.

Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://lore.kernel.org/r/20211215091739.135042-2-maxime@cerno.tech
Stable-dep-of: b230555f3257 ("drm/fourcc: Fix vsub/hsub for Q410 and Q401")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: drm_fourcc: add NV15, Q410, Q401 YUV formats</title>
<updated>2020-06-19T12:33:40+00:00</updated>
<author>
<name>Ben Davis</name>
<email>ben.davis@arm.com</email>
</author>
<published>2020-06-01T16:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94b292b277343190175d39172c903c0c5fb814f1'/>
<id>urn:sha1:94b292b277343190175d39172c903c0c5fb814f1</id>
<content type='text'>
DRM_FORMAT_NV15 is a 2 plane format suitable for linear and 16x16
block-linear memory layouts (DRM_FORMAT_MOD_SAMSUNG_16_16_TILE). The
format is similar to P010 with 4:2:0 sub-sampling but has no padding
between components. Instead, luminance and chrominance samples are
grouped into 4s so that each group is packed into an integer number
of bytes:

YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes

The '15' suffix refers to the optimum effective bits per pixel which is
achieved when the total number of luminance samples is a multiple of 8.

Q410 and Q401 are both 3 plane non-subsampled formats with 16 bits per
component, but only 10 bits are used and 6 are padded. 'Q' is chosen
as the first letter to denote 3 plane YUV444, (and is the next letter
along from P which is usually 2 plane).

V2: Updated block_w of NV15 to {4, 2, 0}
V3: Updated commit message to include specific modifier name

NV15:
Tested-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;

Reviewed-by: Brian Starkey &lt;brian.starkey@arm.com&gt;
Signed-off-by: Ben Davis &lt;ben.davis@arm.com&gt;
Signed-off-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200601162817.18230-1-ben.davis@arm.com
</content>
</entry>
<entry>
<title>drm/fourcc: Fill out all block sizes for P210</title>
<updated>2019-11-28T10:19:32+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-11-26T09:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96227287fd3662a406117d1d56d0b9186279bfe7'/>
<id>urn:sha1:96227287fd3662a406117d1d56d0b9186279bfe7</id>
<content type='text'>
0 means 1 as the default, but it's mighty confusing if the block size
for the first plane is spelled out explicitly, but not for the 2nd
plane.

No cc: stable because this is just confusion, but 0 functional issue.

Acked-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Fixes: 7ba0fee247ee ("drm/fourcc: Add AFBC yuv fourccs for Mali")
Cc: Brian Starkey &lt;brian.starkey@arm.com&gt;
Cc: Ayan Kumar Halder &lt;ayan.halder@arm.com&gt;
Cc: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Cc: Alyssa Rosenzweig &lt;alyssa@rosenzweig.io&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191126091414.226070-2-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/fourcc: Fill out all block sizes for P10/12/16</title>
<updated>2019-11-28T10:15:48+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-11-26T09:14:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=836b131d2cbb15b0615693851dfd97c3ca2ab75f'/>
<id>urn:sha1:836b131d2cbb15b0615693851dfd97c3ca2ab75f</id>
<content type='text'>
0 means 1 as the default, but it's mighty confusing if the block size
for the first plane is spelled out explicitly, but not for the 2nd
plane.

No cc: stable because this is just confusion, but 0 functional issue.

Acked-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Fixes: 05f8bc82fc42 ("drm/fourcc: Add new P010, P016 video format")
Cc: Daniel Stone &lt;daniel@fooishbar.org&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: Randy Li &lt;ayaka@soulik.info&gt;
Cc: Clint Taylor &lt;clinton.a.taylor@intel.com&gt;
Cc: Ayan Kumar Halder &lt;ayan.halder@arm.com&gt;
Cc: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191126091414.226070-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: drop use of drmP.h in drm/*</title>
<updated>2019-05-27T16:07:03+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2019-05-26T17:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0500c04ea14a4143edf902d087079c4e7b2f0229'/>
<id>urn:sha1:0500c04ea14a4143edf902d087079c4e7b2f0229</id>
<content type='text'>
The use of the drmP.h header file is deprecated.
Remove use from all files in drm/*
so people do not look there and follow a bad example.

Build tested allyesconfig,allmodconfig on x86, arm etc.
Including alpha that is as always more challenging than
the rest.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190526173535.32701-8-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm/fourcc: Pass the format_info pointer to drm_format_plane_width/height</title>
<updated>2019-05-20T11:35:24+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@bootlin.com</email>
</author>
<published>2019-05-16T10:31:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf39607c16141811d0f5fe67e231364c96a87e09'/>
<id>urn:sha1:bf39607c16141811d0f5fe67e231364c96a87e09</id>
<content type='text'>
So far, the drm_format_plane_height/width functions were operating on the
format's fourcc and was doing a lookup to retrieve the drm_format_info
structure and return the cpp.

However, this is inefficient since in most cases, we will have the
drm_format_info pointer already available so we shouldn't have to perform a
new lookup. Some drm_fourcc functions also already operate on the
drm_format_info pointer for that reason, so the API is quite inconsistent
there.

Let's follow the latter pattern and remove the extra lookup while being a
bit more consistent.

In order to be extra consistent, also rename that function to
drm_format_info_plane_cpp and to a static function in the header to match
the current policy. The parameters order have also be changed to match the
other functions prototype.

Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Paul Kocialkowski &lt;paul.kocialkowski@bootlin.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/514af1d489d80b8b1767e3716b663ce5103da6eb.1558002671.git-series.maxime.ripard@bootlin.com
</content>
</entry>
<entry>
<title>drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp</title>
<updated>2019-05-20T11:33:46+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@bootlin.com</email>
</author>
<published>2019-05-16T10:31:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24c478ead0bf50a758e9dbecc7356e9eebf20271'/>
<id>urn:sha1:24c478ead0bf50a758e9dbecc7356e9eebf20271</id>
<content type='text'>
So far, the drm_format_plane_cpp function was operating on the format's
fourcc and was doing a lookup to retrieve the drm_format_info structure and
return the cpp.

However, this is inefficient since in most cases, we will have the
drm_format_info pointer already available so we shouldn't have to perform a
new lookup. Some drm_fourcc functions also already operate on the
drm_format_info pointer for that reason, so the API is quite inconsistent
there.

Let's follow the latter pattern and remove the extra lookup while being a
bit more consistent. In order to be extra consistent, also rename that
function to drm_format_info_plane_cpp and to a static function in the
header to match the current policy.

Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Paul Kocialkowski &lt;paul.kocialkowski@bootlin.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/32aa13e53dbc98a90207fd290aa8e79f785fb11e.1558002671.git-series.maxime.ripard@bootlin.com
</content>
</entry>
<entry>
<title>drm: Remove users of drm_format_(horz|vert)_chroma_subsampling</title>
<updated>2019-05-20T11:33:11+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@bootlin.com</email>
</author>
<published>2019-05-16T10:31:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3e9632cb6241a6c098427510ad3ee041365ae64'/>
<id>urn:sha1:f3e9632cb6241a6c098427510ad3ee041365ae64</id>
<content type='text'>
drm_format_horz_chroma_subsampling and drm_format_vert_chroma_subsampling
are basically a lookup in the drm_format_info table plus an access to the
hsub and vsub fields of the appropriate entry.

Most drivers are using this function while having access to the entry
already, which means that we will perform an unnecessary lookup. Removing
the call to these functions is therefore more efficient.

Some drivers will not have access to that entry in the function, but in
this case the overhead is minimal (we just have to call drm_format_info()
to perform the lookup) and we can even avoid multiple, inefficient lookups
in some places that need multiple fields from the drm_format_info
structure.

This is amplified by the fact that most of the time the callers will have
to retrieve both the vsub and hsub fields, meaning that they would perform
twice the lookup.

Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: Paul Kocialkowski &lt;paul.kocialkowski@bootlin.com&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Signed-off-by: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/6b3cceb8161e2c1d40c2681de99202328b0a8abc.1558002671.git-series.maxime.ripard@bootlin.com
</content>
</entry>
</feed>
