<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/tiny/ofdrm.c, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-06-08T16:04:12+00:00</updated>
<entry>
<title>drm/tiny: Convert to platform remove callback returning void</title>
<updated>2023-06-08T16:04:12+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-07T16:26:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=84e6da7ad5537826343636b846530ec2167d4a19'/>
<id>urn:sha1:84e6da7ad5537826343636b846530ec2167d4a19</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert the tiny drm drivers from always returning zero in the
remove callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230507162616.1368908-50-u.kleine-koenig@pengutronix.de
</content>
</entry>
<entry>
<title>drm: Use of_property_read_bool() for boolean properties</title>
<updated>2023-03-30T18:46:07+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-03-10T14:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e27a85c1757655e2e7bd09164b87bf75627e5604'/>
<id>urn:sha1:e27a85c1757655e2e7bd09164b87bf75627e5604</id>
<content type='text'>
It is preferred to use typed property access functions (i.e.
of_property_read_&lt;type&gt; functions) rather than low-level
of_get_property/of_find_property functions for reading properties.
Convert reading boolean properties to of_property_read_bool().

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20230310144706.1542295-1-robh@kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/fb-helper: Replace bpp/depth parameter by color mode</title>
<updated>2023-01-06T13:21:56+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-06T11:23:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3533a8af48479a1af1a8fa7fcb0e5161398c94e'/>
<id>urn:sha1:d3533a8af48479a1af1a8fa7fcb0e5161398c94e</id>
<content type='text'>
Replace the combination of bpp and depth with a single color-mode
argument. Handle special cases in simpledrm and ofdrm. Hard-code
XRGB8888 as fallback format for cases where no given format works.

The color-mode argument accepts the same values as the kernel's video
parameter. These are mostly bpp values between 1 and 32. The exceptions
are 15, which has a color depth of 15 and a bpp value of 16; and 32,
which has a color depth of 24 and a bpp value of 32.

v4:
	* add back lost test for bpp_specified (Maira)
	* add Fixes tag (Daniel)
v3:
	* fix ofdrm build (Maxime)
v2:
	* minimize changes (Daniel)
	* use drm_driver_legacy_fb_format() (Daniel)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Maíra Canal &lt;mcanal@igalia.com&gt; # vc4 and vkms
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Fixes: 37c90d589dc0 ("drm/fb-helper: Fix single-probe color-format selection")
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230106112324.22055-1-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/format-helper: Simplify drm_fb_build_fourcc_list()</title>
<updated>2023-01-03T13:27:39+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-02T11:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=29fca6d56d76363368d012e18b5631340cfcd69c'/>
<id>urn:sha1:29fca6d56d76363368d012e18b5631340cfcd69c</id>
<content type='text'>
The DRM helper drm_fb_build_fourcc_list() creates a list of color
formats for primary planes of the generic drivers. Simplify the helper:

 - It used to mix and filter native and emulated formats as provided
   by the driver. Now the only emulated format is XRGB8888, which is
   required as fallback by legacy software. Drop support for emulating
   any other formats.
 - Also convert alpha formats to their non-alpha counterparts. Generic
   drivers don't support primary planes with alpha formats and some
   DTs incorrectly advertise alpha channels for non-alpha hardware. So
   only export non-alpha formats for primary planes.

With the simplified helper, scrap format lists of the affected generic
drivers. All they need is the firmware buffer's native format, from which
the helper creates the list of color formats.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-13-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/ofdrm: Set preferred depth from format of scanout buffer</title>
<updated>2022-11-24T13:07:52+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-11-23T11:53:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5580f263210d401a4f7a5601c9ec8dbe27da1fc1'/>
<id>urn:sha1:5580f263210d401a4f7a5601c9ec8dbe27da1fc1</id>
<content type='text'>
Set the preferred depth from the format of the scanout buffer. The
value cannot be hardcoded, as the scanout buffer is only known at
runtime. Keeping the existing switch statement just duplicates the
driver's existing logic for format detection.

Also remove the FIXME comment from the call to drm_fbdev_generic_setup()
as the driver now handles color depth and bpp values correctly.

v2:
	* fix commit-message typo

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221123115348.2521-5-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/fb-helper: Move generic fbdev emulation into separate source file</title>
<updated>2022-11-05T16:12:04+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-11-03T15:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8ab59da26bc0ae0abfcaabc4218c74827d154256'/>
<id>urn:sha1:8ab59da26bc0ae0abfcaabc4218c74827d154256</id>
<content type='text'>
Move the generic fbdev implementation into its own source and header
file. Adapt drivers. No functional changes, but some of the internal
helpers have been renamed to fit into the drm_fbdev_ naming scheme.

v3:
	* rename drm_fbdev.{c,h} to drm_fbdev_generic.{c,h}
	* rebase onto vmwgfx changes
	* rebase onto xlnx changes
	* fix include statements in amdgpu

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-22-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/ofdrm: Cast error pointers to void __iomem *</title>
<updated>2022-11-04T13:44:12+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-11-03T10:16:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8300c46385e357079248302722d2f6b48adcba1'/>
<id>urn:sha1:a8300c46385e357079248302722d2f6b48adcba1</id>
<content type='text'>
Cast error pointers when returning them as void __iomem *. Fixes
a number of Sparse warnings, such as the ones shown below.

../drivers/gpu/drm/tiny/ofdrm.c:439:31: warning: incorrect type in return expression (different address spaces)
../drivers/gpu/drm/tiny/ofdrm.c:439:31:    expected void [noderef] __iomem *
../drivers/gpu/drm/tiny/ofdrm.c:439:31:    got void *
../drivers/gpu/drm/tiny/ofdrm.c:442:31: warning: incorrect type in return expression (different address spaces)
../drivers/gpu/drm/tiny/ofdrm.c:442:31:    expected void [noderef] __iomem *
../drivers/gpu/drm/tiny/ofdrm.c:442:31:    got void *

See [1] for the bug report.

v3:
	* use IOMEM_ERR_PTR() (Javier)

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/dri-devel/202210200016.yiQzPIy0-lkp@intel.com/ # [1]
Link: https://patchwork.freedesktop.org/patch/msgid/20221103101627.32502-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/ofdrm: Convert PCI IDs to CPU endianness for comparing</title>
<updated>2022-11-04T13:44:02+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-11-03T10:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e67e865b90b511bf78357ff36fdef99627d829c9'/>
<id>urn:sha1:e67e865b90b511bf78357ff36fdef99627d829c9</id>
<content type='text'>
Properties of 32-bit integers are returned from the OF device tree
as type __be32. Convert PCI vendor and device IDs from __be32 to host
endianness before comparing them to constants. All relevant machines
are old, big-endian Macintosh systems; hence the bug never happened
in practice.

Fixes sparse warnings shown below.

  drivers/gpu/drm/tiny/ofdrm.c:237:17: warning: restricted __be32 degrades to integer
  drivers/gpu/drm/tiny/ofdrm.c:238:18: warning: restricted __be32 degrades to integer
  drivers/gpu/drm/tiny/ofdrm.c:238:54: warning: restricted __be32 degrades to integer

See [1] for the bug report.

v2:
	* convert endianness (Alex)

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/dri-devel/202210192208.D888I6X7-lkp@intel.com/ # [1]
Link: https://patchwork.freedesktop.org/patch/msgid/20221103101627.32502-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/ofdrm: Support big-endian scanout buffers</title>
<updated>2022-10-14T07:51:12+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-10-11T15:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d405bc2c3d82126f58e143708af55105876cf6af'/>
<id>urn:sha1:d405bc2c3d82126f58e143708af55105876cf6af</id>
<content type='text'>
All DRM formats assume little-endian byte order. On big-endian systems,
it is likely that the scanout buffer is in big endian as well. Update
the format accordingly and add endianness conversion to the format-helper
library. Also opt-in to allocated buffers in host format by default.

Suggested-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-6-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/ofdrm: Support color management</title>
<updated>2022-10-14T07:50:25+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-10-11T15:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4bbb9061081c49ded4908c7716a03f7faf4eb65d'/>
<id>urn:sha1:4bbb9061081c49ded4908c7716a03f7faf4eb65d</id>
<content type='text'>
Support the CRTC's color-management property and implement each model's
palette support.

The OF hardware has different methods of setting the palette. The
respective code has been taken from fbdev's offb and refactored into
per-model device functions. The device functions integrate this
functionality into the overall modesetting.

As palette handling is a CRTC property that depends on the primary
plane's color format, the plane's atomic_check helper now updates the
format field in ofdrm's custom CRTC state. The CRTC's atomic_flush
helper updates the palette for the format as needed.

v4:
	* use cpu_to_be32() (Geert)
v3:
	* lookup CRTC state with drm_atomic_get_new_crtc_state()
	* access HW palette with writeb(), writel(), and readl() (Ben)
	* declare register values as u32

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-5-tzimmermann@suse.de
</content>
</entry>
</feed>
