2023-09-15 10:35:15

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support

Hi all,

It has been 3 years since the last conversion of a DRM driver to atomic
modesetting, so I guess it's time for another one? ;-)

Currently, there are two drivers for the LCD controller on Renesas
SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
1. sh_mobile_lcdcfb, using the fbdev framework,
2. shmob_drm, using the DRM framework.
However, only the former driver is used, as all platform support
integrates the former. None of these drivers support DT-based systems.

This patch series converts the SH-Mobile DRM driver to atomic
modesetting, and adds DT support, complemented by the customary set of
fixes and improvements.

Overview:
- Patch 1 adds a separate maintainer entry.
- Patch 2 adds DT bindings for the SH-Mobile LCD controller,
- Patch 3 adds definitions for RGB666 9:9 media bus formats,
- Patches 4-35 contains miscellaneous fixes, improvements, and
cleanups for the SH-Mobile DRM driver,
- Patches 36-40 convert the SH-Mobile DRM driver to atomic
modesetting,
- Patch 41 adds DT support to the SH-Mobile DRM driver.

To reduce strain on the audience, I have CCed the DT and media people
only on the cover letter and the DT resp. media patches. If interested,
the full series should be available through lore.kernel.org.

Some comments and questions can be found in the individual patches.

Changes compared to v3[1]:
- Rebase on top of v6.6-rc1 and commit 775b0669e19f2e4a
("drm/shmobile: Convert to platform remove callback returning void")
in drm-misc/for-linux-next.

Changes compared to v2[2]:
- Add Reviewed-by.

Changes compared to v1[3]:
- New patches:
- "[PATCH v2 01/41] MAINTAINER: Create entry for Renesas SH-Mobile
DRM drivers",
- "[PATCH v2 18/41] drm: renesas: shmobile: Remove custom plane
destroy callback",
- Add myself as co-maintainer,
- Make fck clock required,
- Drop ports description referring to obsolete graph.txt,
- Condition ports to compatible strings,
- Drop label and status from example,
- Add Reviewed-by,
- Drop unused MEDIA_BUS_FMT_RGB666_2X9_LE, as requested by Laurent,
- Move explicit clock handling to Runtime PM callbacks,
- Move devm_pm_runtime_enable() after shmob_drm_setup_clocks(),
- Depend on PM,
- Split off removal of call to drm_plane_force_disable(),
- Select VIDEOMODE_HELPERS,
- Keep table instead of replacing it by a switch() statement,
- Fix shmob_drm_interface_data.bus_fmt comment,
- Drop superfluous blank lines,
- Keep initialization of info fields together,
- Use shmob_drm_bus_fmts[],
- Keep bus format validation at probe time,
- Pass plane type to shmob_drm_plane_create() to avoid having to shift
all overlay plane indices by one,
- Rename primary_plane_funcs to shmob_drm_primary_plane_funcs,
- Rename shmob_drm_plane_funcs to shmob_drm_overlay_plane_funcs,
- Move shmob_drm_crtc_finish_page_flip() further up,
- Inline shmob_drm_crtc_st{art,op}(),
- Use devm_drm_of_get_bridge(),
- Don't print bridge->of_node on failure, as this field depends on
CONFIG_OF.

This has been tested on the R-Mobile A1-based Atmark Techno
Armadillo-800-EVA development board, using both legacy[4] and
DT-based[5] instantiation, with the fbdev-emulated text console, fbset,
and modetest, a.o.

modetest -M shmob-drm -s 43:800x480@RG16 -P 33@41:640x320+80+80@RG16
modetest -M shmob-drm -s 43:800x480@RG16

The output of "modetest -M shmob-drm" can be found below[6].

Not much activity has happened since v2, how can we move this forward?
Thanks!

[1] "[PATCH v3 00/41] drm: renesas: shmobile: Atomic conversion + DT
support"
https://lore.kernel.org/r/[email protected]

[2] "[PATCH v2 00/41] drm: renesas: shmobile: Atomic conversion + DT
support"
https://lore.kernel.org/r/[email protected]

[3] "[PATCH 00/39] drm: renesas: shmobile: Atomic conversion + DT
support"
https://lore.kernel.org/r/[email protected]/

[4] "[PATCH/RFC] staging: board: armadillo800eva: Add DRM support"
https://lore.kernel.org/r/f7874a9da4bcb20fbc9cd133147b67862ebcf0b9.1687418281.git.geert+renesas@glider.be

[5] "[PATCH 0/2] ARM: dts: r8a7740/armadillo800eva: Add LCD support"
https://lore.kernel.org/r/[email protected]

[6] Encoders:
id crtc type possible crtcs possible clones
42 41 DPI 0x00000001 0x00000001

Connectors:
id encoder status name size (mm) modes encoders
43 42 connected DPI-1 111x67 1 42
modes:
index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
#0 800x480 59.99 800 840 968 1056 480 515 517 525 33260 flags: nhsync, nvsync; type: preferred, driver
props:
1 EDID:
flags: immutable blob
blobs:

value:
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
5 link-status:
flags: enum
enums: Good=0 Bad=1
value: 0
6 non-desktop:
flags: immutable range
values: 0 1
value: 0
4 TILE:
flags: immutable blob
blobs:

value:

CRTCs:
id fb pos size
41 44 (0,0) (800x480)
#0 800x480 59.99 800 840 968 1056 480 515 517 525 33260 flags: nhsync, nvsync; type: preferred, driver
props:
24 VRR_ENABLED:
flags: range
values: 0 1
value: 0

Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
31 41 44 0,0 0,0 0 0x00000001
formats: RG16 RG24 AR24 XR24 NV12 NV21 NV16 NV61 NV24 NV42
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000a00000018000000
01000000400000005247313652473234
41523234585232344e5631324e563231
4e5631364e5636314e5632344e563432
ff030000000000000000000000000000
0000000000000000
in_formats blob decoded:
RG16: LINEAR
RG24: LINEAR
AR24: LINEAR
XR24: LINEAR
NV12: LINEAR
NV21: LINEAR
NV16: LINEAR
NV61: LINEAR
NV24: LINEAR
NV42: LINEAR
33 0 0 0,0 0,0 0 0x00000001
formats: RG16 RG24 AR24 XR24 NV12 NV21 NV16 NV61 NV24 NV42
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000a00000018000000
01000000400000005247313652473234
41523234585232344e5631324e563231
4e5631364e5636314e5632344e563432
ff030000000000000000000000000000
0000000000000000
in_formats blob decoded:
RG16: LINEAR
RG24: LINEAR
AR24: LINEAR
XR24: LINEAR
NV12: LINEAR
NV21: LINEAR
NV16: LINEAR
NV61: LINEAR
NV24: LINEAR
NV42: LINEAR
35 0 0 0,0 0,0 0 0x00000001
formats: RG16 RG24 AR24 XR24 NV12 NV21 NV16 NV61 NV24 NV42
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000a00000018000000
01000000400000005247313652473234
41523234585232344e5631324e563231
4e5631364e5636314e5632344e563432
ff030000000000000000000000000000
0000000000000000
in_formats blob decoded:
RG16: LINEAR
RG24: LINEAR
AR24: LINEAR
XR24: LINEAR
NV12: LINEAR
NV21: LINEAR
NV16: LINEAR
NV61: LINEAR
NV24: LINEAR
NV42: LINEAR
37 0 0 0,0 0,0 0 0x00000001
formats: RG16 RG24 AR24 XR24 NV12 NV21 NV16 NV61 NV24 NV42
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000a00000018000000
01000000400000005247313652473234
41523234585232344e5631324e563231
4e5631364e5636314e5632344e563432
ff030000000000000000000000000000
0000000000000000
in_formats blob decoded:
RG16: LINEAR
RG24: LINEAR
AR24: LINEAR
XR24: LINEAR
NV12: LINEAR
NV21: LINEAR
NV16: LINEAR
NV61: LINEAR
NV24: LINEAR
NV42: LINEAR
39 0 0 0,0 0,0 0 0x00000001
formats: RG16 RG24 AR24 XR24 NV12 NV21 NV16 NV61 NV24 NV42
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000a00000018000000
01000000400000005247313652473234
41523234585232344e5631324e563231
4e5631364e5636314e5632344e563432
ff030000000000000000000000000000
0000000000000000
in_formats blob decoded:
RG16: LINEAR
RG24: LINEAR
AR24: LINEAR
XR24: LINEAR
NV12: LINEAR
NV21: LINEAR
NV16: LINEAR
NV61: LINEAR
NV24: LINEAR
NV42: LINEAR

Frame buffers:
id size pitch

Geert Uytterhoeven (36):
MAINTAINER: Create entry for Renesas SH-Mobile DRM drivers
dt-bindings: display: Add Renesas SH-Mobile LCDC bindings
media: uapi: Add MEDIA_BUS_FMT_RGB666_2X9_BE format
drm: renesas: shmobile: Fix overlay plane disable
drm: renesas: shmobile: Fix ARGB32 overlay format typo
drm: renesas: shmobile: Correct encoder/connector types
drm: renesas: shmobile: Add support for Runtime PM
drm: renesas: shmobile: Restore indentation of
shmob_drm_setup_clocks()
drm: renesas: shmobile: Use %p4cc to print fourcc code
drm: renesas: shmobile: Add missing YCbCr formats
drm: renesas: shmobile: Improve shmob_drm_format_info table
drm: renesas: shmobile: Improve error handling
drm: renesas: shmobile: Convert to use devm_request_irq()
drm: renesas: shmobile: Remove custom plane destroy callback
drm: renesas: shmobile: Use drmm_universal_plane_alloc()
drm: renesas: shmobile: Embed drm_device in shmob_drm_device
drm: renesas: shmobile: Convert container helpers to static inline
functions
drm: renesas: shmobile: Replace .dev_private with container_of()
drm: renesas: shmobile: Use media bus formats in platform data
drm: renesas: shmobile: Move interface handling to connector setup
drm: renesas: shmobile: Unify plane allocation
drm: renesas: shmobile: Rename shmob_drm_crtc.crtc
drm: renesas: shmobile: Rename shmob_drm_connector.connector
drm: renesas: shmobile: Rename shmob_drm_plane.plane
drm: renesas: shmobile: Use drm_crtc_handle_vblank()
drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip()
drm: renesas: shmobile: Wait for page flip when turning CRTC off
drm: renesas: shmobile: Turn vblank on/off when enabling/disabling
CRTC
drm: renesas: shmobile: Shutdown the display on remove
drm: renesas: shmobile: Cleanup encoder
drm: renesas: shmobile: Atomic conversion part 1
drm: renesas: shmobile: Atomic conversion part 2
drm: renesas: shmobile: Use suspend/resume helpers
drm: renesas: shmobile: Remove internal CRTC state tracking
drm: renesas: shmobile: Atomic conversion part 3
drm: renesas: shmobile: Add DT support

Laurent Pinchart (5):
drm: renesas: shmobile: Remove backlight support
drm: renesas: shmobile: Don't set display info width and height twice
drm: renesas: shmobile: Rename input clocks
drm: renesas: shmobile: Remove support for SYS panels
drm: renesas: shmobile: Use struct videomode in platform data

.../display/renesas,shmobile-lcdc.yaml | 130 ++++
.../media/v4l/subdev-formats.rst | 72 ++
MAINTAINERS | 13 +-
drivers/gpu/drm/renesas/shmobile/Kconfig | 3 +-
drivers/gpu/drm/renesas/shmobile/Makefile | 3 +-
.../renesas/shmobile/shmob_drm_backlight.c | 82 ---
.../renesas/shmobile/shmob_drm_backlight.h | 19 -
.../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 650 ++++++++----------
.../gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 27 +-
.../gpu/drm/renesas/shmobile/shmob_drm_drv.c | 179 +++--
.../gpu/drm/renesas/shmobile/shmob_drm_drv.h | 18 +-
.../gpu/drm/renesas/shmobile/shmob_drm_kms.c | 77 ++-
.../gpu/drm/renesas/shmobile/shmob_drm_kms.h | 9 +-
.../drm/renesas/shmobile/shmob_drm_plane.c | 326 +++++----
.../drm/renesas/shmobile/shmob_drm_plane.h | 5 +-
include/linux/platform_data/shmob_drm.h | 57 +-
include/uapi/linux/media-bus-format.h | 3 +-
17 files changed, 860 insertions(+), 813 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml
delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.c
delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.h

Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--
2.34.1

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


2023-09-15 12:58:10

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 20/41] drm: renesas: shmobile: Embed drm_device in shmob_drm_device

Embedding drm_device in shmob_drm_device allows us to use the DRM
managed API to allocate both structures in one go, simplifying error
handling.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
---
v4:
- Rebase on top of commit 775b0669e19f2e4a ("drm/shmobile: Convert to
platform remove callback returning void") in
drm-misc/for-linux-next,

v3:
- No changes,

v2:
- Add Reviewed-by.
---
.../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 12 +++---
.../gpu/drm/renesas/shmobile/shmob_drm_drv.c | 40 +++++++------------
.../gpu/drm/renesas/shmobile/shmob_drm_drv.h | 2 +-
.../gpu/drm/renesas/shmobile/shmob_drm_kms.c | 16 ++++----
.../drm/renesas/shmobile/shmob_drm_plane.c | 8 ++--
5 files changed, 34 insertions(+), 44 deletions(-)

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index 015263ac2100c11e..9c66e00ed70ea582 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -116,7 +116,7 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)
struct shmob_drm_device *sdev = crtc->dev->dev_private;
const struct shmob_drm_interface_data *idata = &sdev->pdata->iface;
const struct shmob_drm_format_info *format;
- struct drm_device *dev = sdev->ddev;
+ struct drm_device *dev = &sdev->ddev;
struct drm_plane *plane;
u32 value;
int ret;
@@ -439,7 +439,7 @@ int shmob_drm_crtc_create(struct shmob_drm_device *sdev)

sdev->crtc.dpms = DRM_MODE_DPMS_OFF;

- primary = __drm_universal_plane_alloc(sdev->ddev, sizeof(*primary), 0,
+ primary = __drm_universal_plane_alloc(&sdev->ddev, sizeof(*primary), 0,
0, &primary_plane_funcs,
modeset_formats,
ARRAY_SIZE(modeset_formats),
@@ -448,7 +448,7 @@ int shmob_drm_crtc_create(struct shmob_drm_device *sdev)
if (IS_ERR(primary))
return PTR_ERR(primary);

- ret = drm_crtc_init_with_planes(sdev->ddev, crtc, primary, NULL,
+ ret = drm_crtc_init_with_planes(&sdev->ddev, crtc, primary, NULL,
&crtc_funcs, NULL);
if (ret < 0) {
drm_plane_cleanup(primary);
@@ -524,7 +524,7 @@ int shmob_drm_encoder_create(struct shmob_drm_device *sdev)

encoder->possible_crtcs = 1;

- ret = drm_simple_encoder_init(sdev->ddev, encoder,
+ ret = drm_simple_encoder_init(&sdev->ddev, encoder,
DRM_MODE_ENCODER_DPI);
if (ret < 0)
return ret;
@@ -604,7 +604,7 @@ int shmob_drm_connector_create(struct shmob_drm_device *sdev,
connector->display_info.width_mm = sdev->pdata->panel.width_mm;
connector->display_info.height_mm = sdev->pdata->panel.height_mm;

- ret = drm_connector_init(sdev->ddev, connector, &connector_funcs,
+ ret = drm_connector_init(&sdev->ddev, connector, &connector_funcs,
DRM_MODE_CONNECTOR_DPI);
if (ret < 0)
return ret;
@@ -617,7 +617,7 @@ int shmob_drm_connector_create(struct shmob_drm_device *sdev,

drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
drm_object_property_set_value(&connector->base,
- sdev->ddev->mode_config.dpms_property, DRM_MODE_DPMS_OFF);
+ sdev->ddev.mode_config.dpms_property, DRM_MODE_DPMS_OFF);

return 0;

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
index bf3a9c1db177095e..56e2f407ab53a476 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
@@ -137,7 +137,7 @@ static int shmob_drm_pm_suspend(struct device *dev)
{
struct shmob_drm_device *sdev = dev_get_drvdata(dev);

- drm_kms_helper_poll_disable(sdev->ddev);
+ drm_kms_helper_poll_disable(&sdev->ddev);
shmob_drm_crtc_suspend(&sdev->crtc);

return 0;
@@ -147,11 +147,11 @@ static int shmob_drm_pm_resume(struct device *dev)
{
struct shmob_drm_device *sdev = dev_get_drvdata(dev);

- drm_modeset_lock_all(sdev->ddev);
+ drm_modeset_lock_all(&sdev->ddev);
shmob_drm_crtc_resume(&sdev->crtc);
- drm_modeset_unlock_all(sdev->ddev);
+ drm_modeset_unlock_all(&sdev->ddev);

- drm_kms_helper_poll_enable(sdev->ddev);
+ drm_kms_helper_poll_enable(&sdev->ddev);
return 0;
}

@@ -192,11 +192,10 @@ static const struct dev_pm_ops shmob_drm_pm_ops = {
static void shmob_drm_remove(struct platform_device *pdev)
{
struct shmob_drm_device *sdev = platform_get_drvdata(pdev);
- struct drm_device *ddev = sdev->ddev;
+ struct drm_device *ddev = &sdev->ddev;

drm_dev_unregister(ddev);
drm_kms_helper_poll_fini(ddev);
- drm_dev_put(ddev);
}

static int shmob_drm_probe(struct platform_device *pdev)
@@ -213,13 +212,15 @@ static int shmob_drm_probe(struct platform_device *pdev)
}

/*
- * Allocate and initialize the driver private data, I/O resources and
- * clocks.
+ * Allocate and initialize the DRM device, driver private data, I/O
+ * resources and clocks.
*/
- sdev = devm_kzalloc(&pdev->dev, sizeof(*sdev), GFP_KERNEL);
- if (sdev == NULL)
- return -ENOMEM;
+ sdev = devm_drm_dev_alloc(&pdev->dev, &shmob_drm_driver,
+ struct shmob_drm_device, ddev);
+ if (IS_ERR(sdev))
+ return PTR_ERR(sdev);

+ ddev = &sdev->ddev;
sdev->dev = &pdev->dev;
sdev->pdata = pdata;
spin_lock_init(&sdev->irq_lock);
@@ -242,20 +243,12 @@ static int shmob_drm_probe(struct platform_device *pdev)
if (ret < 0)
return ret;

- /* Allocate and initialize the DRM device. */
- ddev = drm_dev_alloc(&shmob_drm_driver, &pdev->dev);
- if (IS_ERR(ddev))
- return PTR_ERR(ddev);
-
- sdev->ddev = ddev;
ddev->dev_private = sdev;

ret = shmob_drm_modeset_init(sdev);
- if (ret < 0) {
- dev_err_probe(&pdev->dev, ret,
- "failed to initialize mode setting\n");
- goto err_free_drm_dev;
- }
+ if (ret < 0)
+ return dev_err_probe(&pdev->dev, ret,
+ "failed to initialize mode setting\n");

for (i = 0; i < 4; ++i) {
ret = shmob_drm_plane_create(sdev, i);
@@ -297,9 +290,6 @@ static int shmob_drm_probe(struct platform_device *pdev)

err_modeset_cleanup:
drm_kms_helper_poll_fini(ddev);
-err_free_drm_dev:
- drm_dev_put(ddev);
-
return ret;
}

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.h b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.h
index 16d830168b2ada21..77bb0da48f37ace8 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.h
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.h
@@ -32,7 +32,7 @@ struct shmob_drm_device {
unsigned int irq;
spinlock_t irq_lock; /* Protects hardware LDINTR register */

- struct drm_device *ddev;
+ struct drm_device ddev;

struct shmob_drm_crtc crtc;
struct drm_encoder encoder;
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c
index 1a62e7f8a8a9e6df..20316907030b2789 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c
@@ -153,7 +153,7 @@ int shmob_drm_modeset_init(struct shmob_drm_device *sdev)
{
int ret;

- ret = drmm_mode_config_init(sdev->ddev);
+ ret = drmm_mode_config_init(&sdev->ddev);
if (ret)
return ret;

@@ -169,15 +169,15 @@ int shmob_drm_modeset_init(struct shmob_drm_device *sdev)
if (ret < 0)
return ret;

- drm_kms_helper_poll_init(sdev->ddev);
+ drm_kms_helper_poll_init(&sdev->ddev);

- sdev->ddev->mode_config.min_width = 0;
- sdev->ddev->mode_config.min_height = 0;
- sdev->ddev->mode_config.max_width = 4095;
- sdev->ddev->mode_config.max_height = 4095;
- sdev->ddev->mode_config.funcs = &shmob_drm_mode_config_funcs;
+ sdev->ddev.mode_config.min_width = 0;
+ sdev->ddev.mode_config.min_height = 0;
+ sdev->ddev.mode_config.max_width = 4095;
+ sdev->ddev.mode_config.max_height = 4095;
+ sdev->ddev.mode_config.funcs = &shmob_drm_mode_config_funcs;

- drm_helper_disable_unused_functions(sdev->ddev);
+ drm_helper_disable_unused_functions(&sdev->ddev);

return 0;
}
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
index 1fb68b5fe915b8dc..17e66a018689f648 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c
@@ -68,7 +68,7 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane,
splane->format->ldbbsifr;

#define plane_reg_dump(sdev, splane, reg) \
- dev_dbg(sdev->ddev->dev, "%s(%u): %s 0x%08x 0x%08x\n", __func__, \
+ dev_dbg(sdev->ddev.dev, "%s(%u): %s 0x%08x 0x%08x\n", __func__, \
splane->index, #reg, \
lcdc_read(sdev, reg(splane->index)), \
lcdc_read(sdev, reg(splane->index) + LCDC_SIDE_B_OFFSET))
@@ -81,7 +81,7 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane,
plane_reg_dump(sdev, splane, LDBnBSACR);

lcdc_write(sdev, LDBCR, LDBCR_UPC(splane->index));
- dev_dbg(sdev->ddev->dev, "%s(%u): %s 0x%08x\n", __func__, splane->index,
+ dev_dbg(sdev->ddev.dev, "%s(%u): %s 0x%08x\n", __func__, splane->index,
"LDBCR", lcdc_read(sdev, LDBCR));

lcdc_write(sdev, LDBnBSIFR(splane->index), format);
@@ -103,7 +103,7 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane,

lcdc_write(sdev, LDBCR,
LDBCR_UPF(splane->index) | LDBCR_UPD(splane->index));
- dev_dbg(sdev->ddev->dev, "%s(%u): %s 0x%08x\n", __func__, splane->index,
+ dev_dbg(sdev->ddev.dev, "%s(%u): %s 0x%08x\n", __func__, splane->index,
"LDBCR", lcdc_read(sdev, LDBCR));

plane_reg_dump(sdev, splane, LDBnBSIFR);
@@ -198,7 +198,7 @@ int shmob_drm_plane_create(struct shmob_drm_device *sdev, unsigned int index)
{
struct shmob_drm_plane *splane;

- splane = drmm_universal_plane_alloc(sdev->ddev, struct shmob_drm_plane,
+ splane = drmm_universal_plane_alloc(&sdev->ddev, struct shmob_drm_plane,
plane, 1, &shmob_drm_plane_funcs,
formats, ARRAY_SIZE(formats), NULL,
DRM_PLANE_TYPE_OVERLAY, NULL);
--
2.34.1

2023-09-15 12:58:14

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 13/41] drm: renesas: shmobile: Don't set display info width and height twice

From: Laurent Pinchart <[email protected]>

The display info width_mm and height_mm fields are set at init time and
never overwritten, don't set them a second time when getting modes.

Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Sui Jingfeng <[email protected]>
---
v4:
- No changes,

v3:
- No changes,

v2:
- Add Reviewed-by.
---
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index db9d8d440144db36..2ccb2fbfea26b5bf 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -585,9 +585,6 @@ static int shmob_drm_connector_get_modes(struct drm_connector *connector)
drm_mode_set_name(mode);
drm_mode_probed_add(connector, mode);

- connector->display_info.width_mm = sdev->pdata->panel.width_mm;
- connector->display_info.height_mm = sdev->pdata->panel.height_mm;
-
return 1;
}

--
2.34.1

2023-09-15 12:58:15

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 35/41] drm: renesas: shmobile: Cleanup encoder

Most unused callbacks can be NULL pointers these days.
Drop a bunch of empty encoder callbacks.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
---
v4:
- No changes,

v3:
- No changes,

v2:
- Add Reviewed-by.
---
.../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 26 -------------------
1 file changed, 26 deletions(-)

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index ab42a4999a55c475..365eb3e154130d41 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -534,11 +534,6 @@ int shmob_drm_crtc_create(struct shmob_drm_device *sdev)
* Encoder
*/

-static void shmob_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
-{
- /* No-op, everything is handled in the CRTC code. */
-}
-
static bool shmob_drm_encoder_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
@@ -561,29 +556,8 @@ static bool shmob_drm_encoder_mode_fixup(struct drm_encoder *encoder,
return true;
}

-static void shmob_drm_encoder_mode_prepare(struct drm_encoder *encoder)
-{
- /* No-op, everything is handled in the CRTC code. */
-}
-
-static void shmob_drm_encoder_mode_set(struct drm_encoder *encoder,
- struct drm_display_mode *mode,
- struct drm_display_mode *adjusted_mode)
-{
- /* No-op, everything is handled in the CRTC code. */
-}
-
-static void shmob_drm_encoder_mode_commit(struct drm_encoder *encoder)
-{
- /* No-op, everything is handled in the CRTC code. */
-}
-
static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
- .dpms = shmob_drm_encoder_dpms,
.mode_fixup = shmob_drm_encoder_mode_fixup,
- .prepare = shmob_drm_encoder_mode_prepare,
- .commit = shmob_drm_encoder_mode_commit,
- .mode_set = shmob_drm_encoder_mode_set,
};

int shmob_drm_encoder_create(struct shmob_drm_device *sdev)
--
2.34.1

2023-09-15 12:58:21

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 28/41] drm: renesas: shmobile: Rename shmob_drm_connector.connector

Rename the "connector" member of the shmob_drm_connector subclass
structure to "base", to improve readability.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Sui Jingfeng <[email protected]>
---
v4:
- No changes,

v3:
- No changes,

v2:
- Add Reviewed-by.
---
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 4 ++--
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index 84a773a5363035e0..f55b5263e611c782 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -560,7 +560,7 @@ int shmob_drm_encoder_create(struct shmob_drm_device *sdev)

static inline struct shmob_drm_connector *to_shmob_connector(struct drm_connector *connector)
{
- return container_of(connector, struct shmob_drm_connector, connector);
+ return container_of(connector, struct shmob_drm_connector, base);
}

static int shmob_drm_connector_get_modes(struct drm_connector *connector)
@@ -632,7 +632,7 @@ shmob_drm_connector_init(struct shmob_drm_device *sdev,
if (!scon)
return ERR_PTR(-ENOMEM);

- connector = &scon->connector;
+ connector = &scon->base;
scon->encoder = encoder;
scon->mode = &sdev->pdata->panel.mode;

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h
index 79cce0a0ada4cfce..2c6d7541427581a6 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h
@@ -33,7 +33,7 @@ struct shmob_drm_crtc {
};

struct shmob_drm_connector {
- struct drm_connector connector;
+ struct drm_connector base;
struct drm_encoder *encoder;
const struct videomode *mode;
};
--
2.34.1

2023-09-15 12:58:23

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 03/41] media: uapi: Add MEDIA_BUS_FMT_RGB666_2X9_BE format

Add the RGB666 9:9 format MEDIA_BUS_FMT_RGB666_2X9_BE, which is
supported by the SH-Mobile LCD Controller.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
---
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: [email protected]

v4:
- No changes,

v3:
- No changes,

v2:
- Add Reviewed-by,
- Drop unused MEDIA_BUS_FMT_RGB666_2X9_LE, as requested by Laurent.
---
.../media/v4l/subdev-formats.rst | 72 +++++++++++++++++++
include/uapi/linux/media-bus-format.h | 3 +-
2 files changed, 74 insertions(+), 1 deletion(-)

diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index a3a35eeed70846ba..eb3cd20b0cf2e3d6 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -949,6 +949,78 @@ The following tables list existing packed RGB formats.
- b\ :sub:`2`
- b\ :sub:`1`
- b\ :sub:`0`
+ * .. _MEDIA-BUS-FMT-RGB666-2X9-BE:
+
+ - MEDIA_BUS_FMT_RGB666_2X9_BE
+ - 0x1025
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ - r\ :sub:`5`
+ - r\ :sub:`4`
+ - r\ :sub:`3`
+ - r\ :sub:`2`
+ - r\ :sub:`1`
+ - r\ :sub:`0`
+ - g\ :sub:`5`
+ - g\ :sub:`4`
+ - g\ :sub:`3`
+ * -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ - g\ :sub:`2`
+ - g\ :sub:`1`
+ - g\ :sub:`0`
+ - b\ :sub:`5`
+ - b\ :sub:`4`
+ - b\ :sub:`3`
+ - b\ :sub:`2`
+ - b\ :sub:`1`
+ - b\ :sub:`0`
* .. _MEDIA-BUS-FMT-BGR666-1X18:

- MEDIA_BUS_FMT_BGR666_1X18
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index a03c543cb072de30..f05f747e444d6686 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,7 +34,7 @@

#define MEDIA_BUS_FMT_FIXED 0x0001

-/* RGB - next is 0x1025 */
+/* RGB - next is 0x1026 */
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
@@ -46,6 +46,7 @@
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
+#define MEDIA_BUS_FMT_RGB666_2X9_BE 0x1025
#define MEDIA_BUS_FMT_BGR666_1X18 0x1023
#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
--
2.34.1

2023-09-15 12:58:28

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 39/41] drm: renesas: shmobile: Remove internal CRTC state tracking

Now the suspend/resume methods no longer need to look at internal driver
state, the dpms and started fields in the shmob_drm_crtc structure can
be removed, as well as the shmob_drm_crtc_dpms() wrapper. After this,
shmob_drm_crtc_atomic_{en,dis}able() became just wrappers around
shmob_drm_crtc_st{art,op}(), so inline the latter.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
---
v4:
- No changes,

v3:
- No changes,

v2:
- Add Reviewed-by,
- Inline shmob_drm_crtc_st{art,op}().
---
.../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 66 ++++---------------
.../gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 3 -
2 files changed, 11 insertions(+), 58 deletions(-)

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index a176cd3e494ed2fd..e4d176b1f47654a8 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -191,25 +191,21 @@ static void shmob_drm_crtc_start_stop(struct shmob_drm_crtc *scrtc, bool start)
}
}

-/*
- * shmob_drm_crtc_start - Configure and start the LCDC
- * @scrtc: the SH Mobile CRTC
- *
- * Configure and start the LCDC device. External devices (clocks, MERAM, panels,
- * ...) are not touched by this function.
- */
-static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)
+static inline struct shmob_drm_crtc *to_shmob_crtc(struct drm_crtc *crtc)
{
- struct drm_crtc *crtc = &scrtc->base;
+ return container_of(crtc, struct shmob_drm_crtc, base);
+}
+
+static void shmob_drm_crtc_atomic_enable(struct drm_crtc *crtc,
+ struct drm_atomic_state *state)
+{
+ struct shmob_drm_crtc *scrtc = to_shmob_crtc(crtc);
struct shmob_drm_device *sdev = to_shmob_device(crtc->dev);
const struct shmob_drm_interface_data *idata = &sdev->pdata->iface;
struct device *dev = sdev->dev;
u32 value;
int ret;

- if (scrtc->started)
- return;
-
ret = pm_runtime_resume_and_get(dev);
if (ret)
return;
@@ -256,18 +252,14 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)

/* Turn vertical blank interrupt reporting back on. */
drm_crtc_vblank_on(crtc);
-
- scrtc->started = true;
}

-static void shmob_drm_crtc_stop(struct shmob_drm_crtc *scrtc)
+static void shmob_drm_crtc_atomic_disable(struct drm_crtc *crtc,
+ struct drm_atomic_state *state)
{
- struct drm_crtc *crtc = &scrtc->base;
+ struct shmob_drm_crtc *scrtc = to_shmob_crtc(crtc);
struct shmob_drm_device *sdev = to_shmob_device(crtc->dev);

- if (!scrtc->started)
- return;
-
/*
* Disable vertical blank interrupt reporting. We first need to wait
* for page flip completion before stopping the CRTC as userspace
@@ -283,28 +275,6 @@ static void shmob_drm_crtc_stop(struct shmob_drm_crtc *scrtc)
lcdc_write(sdev, LDCNT1R, 0);

pm_runtime_put(sdev->dev);
-
- scrtc->started = false;
-}
-
-static inline struct shmob_drm_crtc *to_shmob_crtc(struct drm_crtc *crtc)
-{
- return container_of(crtc, struct shmob_drm_crtc, base);
-}
-
-static void shmob_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
-{
- struct shmob_drm_crtc *scrtc = to_shmob_crtc(crtc);
-
- if (scrtc->dpms == mode)
- return;
-
- if (mode == DRM_MODE_DPMS_ON)
- shmob_drm_crtc_start(scrtc);
- else
- shmob_drm_crtc_stop(scrtc);
-
- scrtc->dpms = mode;
}

static void shmob_drm_crtc_atomic_flush(struct drm_crtc *crtc,
@@ -323,18 +293,6 @@ static void shmob_drm_crtc_atomic_flush(struct drm_crtc *crtc,
}
}

-static void shmob_drm_crtc_atomic_enable(struct drm_crtc *crtc,
- struct drm_atomic_state *state)
-{
- shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
-}
-
-static void shmob_drm_crtc_atomic_disable(struct drm_crtc *crtc,
- struct drm_atomic_state *state)
-{
- shmob_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
-}
-
static const struct drm_crtc_helper_funcs crtc_helper_funcs = {
.atomic_flush = shmob_drm_crtc_atomic_flush,
.atomic_enable = shmob_drm_crtc_atomic_enable,
@@ -424,8 +382,6 @@ int shmob_drm_crtc_create(struct shmob_drm_device *sdev)

init_waitqueue_head(&sdev->crtc.flip_wait);

- sdev->crtc.dpms = DRM_MODE_DPMS_OFF;
-
primary = shmob_drm_plane_create(sdev, DRM_PLANE_TYPE_PRIMARY, 0);
if (IS_ERR(primary))
return PTR_ERR(primary);
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h
index 37380c815f1f5a08..89a0746f9a35807d 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h
@@ -27,9 +27,6 @@ struct shmob_drm_crtc {

struct drm_pending_vblank_event *event;
wait_queue_head_t flip_wait;
- int dpms;
-
- bool started;
};

struct shmob_drm_connector {
--
2.34.1

2023-09-15 12:58:31

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH v4 33/41] drm: renesas: shmobile: Turn vblank on/off when enabling/disabling CRTC

The DRM core vblank handling mechanism requires drivers to forcefully
turn vblank reporting off when disabling the CRTC, and to restore the
vblank reporting status when enabling the CRTC.
Implement this using the drm_crtc_vblank_{on,off}() helpers.

Note that drm_crtc_vblank_off() must be called at startup to synchronize
the state of the vblank core code with the hardware, which is initially
disabled. This is performed at CRTC creation time, requiring vertical
blank initialization to be moved before creating CRTCs.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
---
v4:
- No changes,

v3:
- No changes,

v2:
- Add Reviewed-by.
---
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 10 +++++++++-
drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 12 ++++++------
2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index 20adb9d2fa178250..ab42a4999a55c475 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -271,6 +271,9 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)

shmob_drm_crtc_start_stop(scrtc, true);

+ /* Turn vertical blank interrupt reporting back on. */
+ drm_crtc_vblank_on(crtc);
+
scrtc->started = true;
}

@@ -283,10 +286,12 @@ static void shmob_drm_crtc_stop(struct shmob_drm_crtc *scrtc)
return;

/*
- * Wait for page flip completion before stopping the CRTC as userspace
+ * Disable vertical blank interrupt reporting. We first need to wait
+ * for page flip completion before stopping the CRTC as userspace
* expects page flips to eventually complete.
*/
shmob_drm_crtc_wait_page_flip(scrtc);
+ drm_crtc_vblank_off(crtc);

/* Stop the LCDC. */
shmob_drm_crtc_start_stop(scrtc, false);
@@ -519,6 +524,9 @@ int shmob_drm_crtc_create(struct shmob_drm_device *sdev)

drm_crtc_helper_add(crtc, &crtc_helper_funcs);

+ /* Start with vertical blank interrupt reporting disabled. */
+ drm_crtc_vblank_off(crtc);
+
return 0;
}

diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
index 2bd205f9ea723062..c3a1995403d6c2c9 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c
@@ -215,17 +215,17 @@ static int shmob_drm_probe(struct platform_device *pdev)
if (ret)
return ret;

- ret = shmob_drm_modeset_init(sdev);
- if (ret < 0)
- return dev_err_probe(&pdev->dev, ret,
- "failed to initialize mode setting\n");
-
ret = drm_vblank_init(ddev, 1);
if (ret < 0) {
dev_err(&pdev->dev, "failed to initialize vblank\n");
- goto err_modeset_cleanup;
+ return ret;
}

+ ret = shmob_drm_modeset_init(sdev);
+ if (ret < 0)
+ return dev_err_probe(&pdev->dev, ret,
+ "failed to initialize mode setting\n");
+
ret = platform_get_irq(pdev, 0);
if (ret < 0)
goto err_modeset_cleanup;
--
2.34.1

2023-09-19 14:35:19

by Geert Uytterhoeven

[permalink] [raw]
Subject: [GIT PULL] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

Hi David, Daniel,

The following changes since commit 0663e1da5ba8e6459e3555ac12c62741668c0d30:

drm/dp_mst: Tune down error message during payload addition
(2023-09-18 16:38:21 +0300)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
tags/shmob-drm-atomic-dt-tag1

for you to fetch changes up to bfea0fa9052aa8d235b24957eb84d9ff20cb87b7:

drm: renesas: shmobile: Add DT support (2023-09-19 15:58:04 +0200)

----------------------------------------------------------------
drm: renesas: shmobile: Atomic conversion + DT support

Currently, there are two drivers for the LCD controller on Renesas
SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
1. sh_mobile_lcdcfb, using the fbdev framework,
2. shmob_drm, using the DRM framework.
However, only the former driver is used, as all platform support
integrates the former. None of these drivers support DT-based systems.

Convert the SH-Mobile DRM driver to atomic modesetting, and add DT
support, complemented by the customary set of fixes and improvements.

Link: https://lore.kernel.org/r/[email protected]/

This PR is based on today's drm-misc/for-linux-next, to avoid a
conflict with commit 775b0669e19f2e4a ("drm/shmobile: Convert to
platform remove callback returning void") in drm-misc/for-linux-next
.
Thanks for pulling!
----------------------------------------------------------------
Geert Uytterhoeven (36):
MAINTAINER: Create entry for Renesas SH-Mobile DRM drivers
dt-bindings: display: Add Renesas SH-Mobile LCDC bindings
media: uapi: Add MEDIA_BUS_FMT_RGB666_2X9_BE format
drm: renesas: shmobile: Fix overlay plane disable
drm: renesas: shmobile: Fix ARGB32 overlay format typo
drm: renesas: shmobile: Correct encoder/connector types
drm: renesas: shmobile: Add support for Runtime PM
drm: renesas: shmobile: Restore indentation of shmob_drm_setup_clocks()
drm: renesas: shmobile: Use %p4cc to print fourcc code
drm: renesas: shmobile: Add missing YCbCr formats
drm: renesas: shmobile: Improve shmob_drm_format_info table
drm: renesas: shmobile: Improve error handling
drm: renesas: shmobile: Convert to use devm_request_irq()
drm: renesas: shmobile: Remove custom plane destroy callback
drm: renesas: shmobile: Use drmm_universal_plane_alloc()
drm: renesas: shmobile: Embed drm_device in shmob_drm_device
drm: renesas: shmobile: Convert container helpers to static
inline functions
drm: renesas: shmobile: Replace .dev_private with container_of()
drm: renesas: shmobile: Use media bus formats in platform data
drm: renesas: shmobile: Move interface handling to connector setup
drm: renesas: shmobile: Unify plane allocation
drm: renesas: shmobile: Rename shmob_drm_crtc.crtc
drm: renesas: shmobile: Rename shmob_drm_connector.connector
drm: renesas: shmobile: Rename shmob_drm_plane.plane
drm: renesas: shmobile: Use drm_crtc_handle_vblank()
drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip()
drm: renesas: shmobile: Wait for page flip when turning CRTC off
drm: renesas: shmobile: Turn vblank on/off when enabling/disabling CRTC
drm: renesas: shmobile: Shutdown the display on remove
drm: renesas: shmobile: Cleanup encoder
drm: renesas: shmobile: Atomic conversion part 1
drm: renesas: shmobile: Atomic conversion part 2
drm: renesas: shmobile: Use suspend/resume helpers
drm: renesas: shmobile: Remove internal CRTC state tracking
drm: renesas: shmobile: Atomic conversion part 3
drm: renesas: shmobile: Add DT support

Laurent Pinchart (5):
drm: renesas: shmobile: Remove backlight support
drm: renesas: shmobile: Don't set display info width and height twice
drm: renesas: shmobile: Rename input clocks
drm: renesas: shmobile: Remove support for SYS panels
drm: renesas: shmobile: Use struct videomode in platform data

.../bindings/display/renesas,shmobile-lcdc.yaml | 130 +++++
.../userspace-api/media/v4l/subdev-formats.rst | 72 +++
MAINTAINERS | 13 +-
drivers/gpu/drm/renesas/shmobile/Kconfig | 3 +-
drivers/gpu/drm/renesas/shmobile/Makefile | 3 +-
.../gpu/drm/renesas/shmobile/shmob_drm_backlight.c | 82 ---
.../gpu/drm/renesas/shmobile/shmob_drm_backlight.h | 19 -
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 650 +++++++++------------
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 27 +-
drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 179 +++---
drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.h | 18 +-
drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c | 77 ++-
drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.h | 9 +-
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 326 ++++++-----
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.h | 5 +-
include/linux/platform_data/shmob_drm.h | 57 +-
include/uapi/linux/media-bus-format.h | 3 +-
17 files changed, 860 insertions(+), 813 deletions(-)
create mode 100644
Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml
delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.c
delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.h

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-09-19 20:33:16

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [GIT PULL] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

On Tue, Sep 19, 2023 at 04:28:40PM +0200, Geert Uytterhoeven wrote:
> Hi David, Daniel,
>
> The following changes since commit 0663e1da5ba8e6459e3555ac12c62741668c0d30:
>
> drm/dp_mst: Tune down error message during payload addition
> (2023-09-18 16:38:21 +0300)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
> tags/shmob-drm-atomic-dt-tag1
>
> for you to fetch changes up to bfea0fa9052aa8d235b24957eb84d9ff20cb87b7:
>
> drm: renesas: shmobile: Add DT support (2023-09-19 15:58:04 +0200)
>
> ----------------------------------------------------------------
> drm: renesas: shmobile: Atomic conversion + DT support
>
> Currently, there are two drivers for the LCD controller on Renesas
> SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
> 1. sh_mobile_lcdcfb, using the fbdev framework,
> 2. shmob_drm, using the DRM framework.
> However, only the former driver is used, as all platform support
> integrates the former. None of these drivers support DT-based systems.
>
> Convert the SH-Mobile DRM driver to atomic modesetting, and add DT
> support, complemented by the customary set of fixes and improvements.
>
> Link: https://lore.kernel.org/r/[email protected]/
>
> This PR is based on today's drm-misc/for-linux-next, to avoid a
> conflict with commit 775b0669e19f2e4a ("drm/shmobile: Convert to
> platform remove callback returning void") in drm-misc/for-linux-next
> .
> Thanks for pulling!
> ----------------------------------------------------------------
> Geert Uytterhoeven (36):
> MAINTAINER: Create entry for Renesas SH-Mobile DRM drivers

I'm technically listed as the maintainer for this driver until Geert
takes over, so for this pull request,

Acked-by: Laurent Pinchart <[email protected]>

And after that, shmobile won't need my ack to merge further changes :-)

This is very nice work Geert. I'm looking forward to dropping the
sh_mobile_lcdcfb driver.

> dt-bindings: display: Add Renesas SH-Mobile LCDC bindings
> media: uapi: Add MEDIA_BUS_FMT_RGB666_2X9_BE format
> drm: renesas: shmobile: Fix overlay plane disable
> drm: renesas: shmobile: Fix ARGB32 overlay format typo
> drm: renesas: shmobile: Correct encoder/connector types
> drm: renesas: shmobile: Add support for Runtime PM
> drm: renesas: shmobile: Restore indentation of shmob_drm_setup_clocks()
> drm: renesas: shmobile: Use %p4cc to print fourcc code
> drm: renesas: shmobile: Add missing YCbCr formats
> drm: renesas: shmobile: Improve shmob_drm_format_info table
> drm: renesas: shmobile: Improve error handling
> drm: renesas: shmobile: Convert to use devm_request_irq()
> drm: renesas: shmobile: Remove custom plane destroy callback
> drm: renesas: shmobile: Use drmm_universal_plane_alloc()
> drm: renesas: shmobile: Embed drm_device in shmob_drm_device
> drm: renesas: shmobile: Convert container helpers to static inline functions
> drm: renesas: shmobile: Replace .dev_private with container_of()
> drm: renesas: shmobile: Use media bus formats in platform data
> drm: renesas: shmobile: Move interface handling to connector setup
> drm: renesas: shmobile: Unify plane allocation
> drm: renesas: shmobile: Rename shmob_drm_crtc.crtc
> drm: renesas: shmobile: Rename shmob_drm_connector.connector
> drm: renesas: shmobile: Rename shmob_drm_plane.plane
> drm: renesas: shmobile: Use drm_crtc_handle_vblank()
> drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip()
> drm: renesas: shmobile: Wait for page flip when turning CRTC off
> drm: renesas: shmobile: Turn vblank on/off when enabling/disabling CRTC
> drm: renesas: shmobile: Shutdown the display on remove
> drm: renesas: shmobile: Cleanup encoder
> drm: renesas: shmobile: Atomic conversion part 1
> drm: renesas: shmobile: Atomic conversion part 2
> drm: renesas: shmobile: Use suspend/resume helpers
> drm: renesas: shmobile: Remove internal CRTC state tracking
> drm: renesas: shmobile: Atomic conversion part 3
> drm: renesas: shmobile: Add DT support
>
> Laurent Pinchart (5):
> drm: renesas: shmobile: Remove backlight support
> drm: renesas: shmobile: Don't set display info width and height twice
> drm: renesas: shmobile: Rename input clocks
> drm: renesas: shmobile: Remove support for SYS panels
> drm: renesas: shmobile: Use struct videomode in platform data
>
> .../bindings/display/renesas,shmobile-lcdc.yaml | 130 +++++
> .../userspace-api/media/v4l/subdev-formats.rst | 72 +++
> MAINTAINERS | 13 +-
> drivers/gpu/drm/renesas/shmobile/Kconfig | 3 +-
> drivers/gpu/drm/renesas/shmobile/Makefile | 3 +-
> .../gpu/drm/renesas/shmobile/shmob_drm_backlight.c | 82 ---
> .../gpu/drm/renesas/shmobile/shmob_drm_backlight.h | 19 -
> drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 650 +++++++++------------
> drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 27 +-
> drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 179 +++---
> drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.h | 18 +-
> drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c | 77 ++-
> drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.h | 9 +-
> drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 326 ++++++-----
> drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.h | 5 +-
> include/linux/platform_data/shmob_drm.h | 57 +-
> include/uapi/linux/media-bus-format.h | 3 +-
> 17 files changed, 860 insertions(+), 813 deletions(-)
> create mode 100644
> Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml
> delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.c
> delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.h

--
Regards,

Laurent Pinchart

2023-09-26 15:08:18

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [GIT PULL] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

Hi Laurent, David, Daniel,

On Tue, Sep 19, 2023 at 5:24 PM Laurent Pinchart
<[email protected]> wrote:
> On Tue, Sep 19, 2023 at 04:28:40PM +0200, Geert Uytterhoeven wrote:
> > The following changes since commit 0663e1da5ba8e6459e3555ac12c62741668c0d30:
> >
> > drm/dp_mst: Tune down error message during payload addition
> > (2023-09-18 16:38:21 +0300)
> >
> > are available in the Git repository at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
> > tags/shmob-drm-atomic-dt-tag1
> >
> > for you to fetch changes up to bfea0fa9052aa8d235b24957eb84d9ff20cb87b7:
> >
> > drm: renesas: shmobile: Add DT support (2023-09-19 15:58:04 +0200)
> >
> > ----------------------------------------------------------------
> > drm: renesas: shmobile: Atomic conversion + DT support
> >
> > Currently, there are two drivers for the LCD controller on Renesas
> > SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
> > 1. sh_mobile_lcdcfb, using the fbdev framework,
> > 2. shmob_drm, using the DRM framework.
> > However, only the former driver is used, as all platform support
> > integrates the former. None of these drivers support DT-based systems.
> >
> > Convert the SH-Mobile DRM driver to atomic modesetting, and add DT
> > support, complemented by the customary set of fixes and improvements.
> >
> > Link: https://lore.kernel.org/r/[email protected]/
> >
> > This PR is based on today's drm-misc/for-linux-next, to avoid a
> > conflict with commit 775b0669e19f2e4a ("drm/shmobile: Convert to
> > platform remove callback returning void") in drm-misc/for-linux-next

Now drm-misc/for-linux-next (which is still at v6.5-rc2) has been
merged into drm/drm-next (which is at v6.6-rc2), do you want me to
rebase my branch to current drm/drm-next, or any other commit?

Thanks!

> > Thanks for pulling!
> > ----------------------------------------------------------------
> > Geert Uytterhoeven (36):
> > MAINTAINER: Create entry for Renesas SH-Mobile DRM drivers
>
> I'm technically listed as the maintainer for this driver until Geert
> takes over, so for this pull request,
>
> Acked-by: Laurent Pinchart <[email protected]>
>
> And after that, shmobile won't need my ack to merge further changes :-)
>
> This is very nice work Geert. I'm looking forward to dropping the
> sh_mobile_lcdcfb driver.

Thank you!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-10-06 06:58:14

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [GIT PULL] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

Hi all,

On Tue, Sep 26, 2023 at 4:51 PM Geert Uytterhoeven <[email protected]> wrote:
> On Tue, Sep 19, 2023 at 5:24 PM Laurent Pinchart
> <[email protected]> wrote:
> > On Tue, Sep 19, 2023 at 04:28:40PM +0200, Geert Uytterhoeven wrote:
> > > The following changes since commit 0663e1da5ba8e6459e3555ac12c62741668c0d30:
> > >
> > > drm/dp_mst: Tune down error message during payload addition
> > > (2023-09-18 16:38:21 +0300)
> > >
> > > are available in the Git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
> > > tags/shmob-drm-atomic-dt-tag1
> > >
> > > for you to fetch changes up to bfea0fa9052aa8d235b24957eb84d9ff20cb87b7:
> > >
> > > drm: renesas: shmobile: Add DT support (2023-09-19 15:58:04 +0200)
> > >
> > > ----------------------------------------------------------------
> > > drm: renesas: shmobile: Atomic conversion + DT support
> > >
> > > Currently, there are two drivers for the LCD controller on Renesas
> > > SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
> > > 1. sh_mobile_lcdcfb, using the fbdev framework,
> > > 2. shmob_drm, using the DRM framework.
> > > However, only the former driver is used, as all platform support
> > > integrates the former. None of these drivers support DT-based systems.
> > >
> > > Convert the SH-Mobile DRM driver to atomic modesetting, and add DT
> > > support, complemented by the customary set of fixes and improvements.
> > >
> > > Link: https://lore.kernel.org/r/[email protected]/
> > >
> > > This PR is based on today's drm-misc/for-linux-next, to avoid a
> > > conflict with commit 775b0669e19f2e4a ("drm/shmobile: Convert to
> > > platform remove callback returning void") in drm-misc/for-linux-next
>
> Now drm-misc/for-linux-next (which is still at v6.5-rc2) has been
> merged into drm/drm-next (which is at v6.6-rc2), do you want me to
> rebase my branch to current drm/drm-next, or any other commit?

Please advise me what needs to be done to move this forward.
Thanks!

> > > Thanks for pulling!
> > > ----------------------------------------------------------------
> > > Geert Uytterhoeven (36):
> > > MAINTAINER: Create entry for Renesas SH-Mobile DRM drivers
> >
> > I'm technically listed as the maintainer for this driver until Geert
> > takes over, so for this pull request,
> >
> > Acked-by: Laurent Pinchart <[email protected]>
> >
> > And after that, shmobile won't need my ack to merge further changes :-)
> >
> > This is very nice work Geert. I'm looking forward to dropping the
> > sh_mobile_lcdcfb driver.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-10-16 09:59:34

by Geert Uytterhoeven

[permalink] [raw]
Subject: [GIT PULL v2] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

Hi David, Daniel,

The following changes since commit 389af786f92ecdff35883551d54bf4e507ffcccb:

Merge tag 'drm-intel-next-2023-09-29' of
git://anongit.freedesktop.org/drm/drm-intel into drm-next (2023-10-04
13:55:19 +1000)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
tags/shmob-drm-atomic-dt-tag2

for you to fetch changes up to 1399ebacbf590dfbac4fbba181dd1595b2fa10ba:

drm: renesas: shmobile: Add DT support (2023-10-16 11:47:48 +0200)

----------------------------------------------------------------
drm: renesas: shmobile: Atomic conversion + DT support

Currently, there are two drivers for the LCD controller on Renesas
SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
1. sh_mobile_lcdcfb, using the fbdev framework,
2. shmob_drm, using the DRM framework.
However, only the former driver is used, as all platform support
integrates the former. None of these drivers support DT-based systems.

Convert the SH-Mobile DRM driver to atomic modesetting, and add DT
support, complemented by the customary set of fixes and improvements.

Acked-by: Laurent Pinchart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]/

Changes compared to v1:
- Rebase to drm-next,
- Add Acked-by.

Thanks for pulling!

----------------------------------------------------------------
Geert Uytterhoeven (36):
MAINTAINER: Create entry for Renesas SH-Mobile DRM drivers
dt-bindings: display: Add Renesas SH-Mobile LCDC bindings
media: uapi: Add MEDIA_BUS_FMT_RGB666_2X9_BE format
drm: renesas: shmobile: Fix overlay plane disable
drm: renesas: shmobile: Fix ARGB32 overlay format typo
drm: renesas: shmobile: Correct encoder/connector types
drm: renesas: shmobile: Add support for Runtime PM
drm: renesas: shmobile: Restore indentation of shmob_drm_setup_clocks()
drm: renesas: shmobile: Use %p4cc to print fourcc code
drm: renesas: shmobile: Add missing YCbCr formats
drm: renesas: shmobile: Improve shmob_drm_format_info table
drm: renesas: shmobile: Improve error handling
drm: renesas: shmobile: Convert to use devm_request_irq()
drm: renesas: shmobile: Remove custom plane destroy callback
drm: renesas: shmobile: Use drmm_universal_plane_alloc()
drm: renesas: shmobile: Embed drm_device in shmob_drm_device
drm: renesas: shmobile: Convert container helpers to static
inline functions
drm: renesas: shmobile: Replace .dev_private with container_of()
drm: renesas: shmobile: Use media bus formats in platform data
drm: renesas: shmobile: Move interface handling to connector setup
drm: renesas: shmobile: Unify plane allocation
drm: renesas: shmobile: Rename shmob_drm_crtc.crtc
drm: renesas: shmobile: Rename shmob_drm_connector.connector
drm: renesas: shmobile: Rename shmob_drm_plane.plane
drm: renesas: shmobile: Use drm_crtc_handle_vblank()
drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip()
drm: renesas: shmobile: Wait for page flip when turning CRTC off
drm: renesas: shmobile: Turn vblank on/off when enabling/disabling CRTC
drm: renesas: shmobile: Shutdown the display on remove
drm: renesas: shmobile: Cleanup encoder
drm: renesas: shmobile: Atomic conversion part 1
drm: renesas: shmobile: Atomic conversion part 2
drm: renesas: shmobile: Use suspend/resume helpers
drm: renesas: shmobile: Remove internal CRTC state tracking
drm: renesas: shmobile: Atomic conversion part 3
drm: renesas: shmobile: Add DT support

Laurent Pinchart (5):
drm: renesas: shmobile: Remove backlight support
drm: renesas: shmobile: Don't set display info width and height twice
drm: renesas: shmobile: Rename input clocks
drm: renesas: shmobile: Remove support for SYS panels
drm: renesas: shmobile: Use struct videomode in platform data

.../bindings/display/renesas,shmobile-lcdc.yaml | 130 +++++
.../userspace-api/media/v4l/subdev-formats.rst | 72 +++
MAINTAINERS | 13 +-
drivers/gpu/drm/renesas/shmobile/Kconfig | 3 +-
drivers/gpu/drm/renesas/shmobile/Makefile | 3 +-
.../gpu/drm/renesas/shmobile/shmob_drm_backlight.c | 82 ---
.../gpu/drm/renesas/shmobile/shmob_drm_backlight.h | 19 -
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 650 +++++++++------------
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.h | 27 +-
drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 179 +++---
drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.h | 18 +-
drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c | 77 ++-
drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.h | 9 +-
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 326 ++++++-----
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.h | 5 +-
include/linux/platform_data/shmob_drm.h | 57 +-
include/uapi/linux/media-bus-format.h | 3 +-
17 files changed, 860 insertions(+), 813 deletions(-)
create mode 100644
Documentation/devicetree/bindings/display/renesas,shmobile-lcdc.yaml
delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.c
delete mode 100644 drivers/gpu/drm/renesas/shmobile/shmob_drm_backlight.h

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-10-24 10:08:52

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [GIT PULL v2] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

On Mon, Oct 16, 2023 at 11:59 AM Geert Uytterhoeven
<[email protected]> wrote:
>
> Hi David, Daniel,
>
> The following changes since commit 389af786f92ecdff35883551d54bf4e507ffcccb:
>
> Merge tag 'drm-intel-next-2023-09-29' of
> git://anongit.freedesktop.org/drm/drm-intel into drm-next (2023-10-04
> 13:55:19 +1000)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
> tags/shmob-drm-atomic-dt-tag2
>
> for you to fetch changes up to 1399ebacbf590dfbac4fbba181dd1595b2fa10ba:
>
> drm: renesas: shmobile: Add DT support (2023-10-16 11:47:48 +0200)
>
> ----------------------------------------------------------------
> drm: renesas: shmobile: Atomic conversion + DT support
>
> Currently, there are two drivers for the LCD controller on Renesas
> SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
> 1. sh_mobile_lcdcfb, using the fbdev framework,
> 2. shmob_drm, using the DRM framework.
> However, only the former driver is used, as all platform support
> integrates the former. None of these drivers support DT-based systems.
>
> Convert the SH-Mobile DRM driver to atomic modesetting, and add DT
> support, complemented by the customary set of fixes and improvements.
>
> Acked-by: Laurent Pinchart <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]/
>
> Changes compared to v1:
> - Rebase to drm-next,
> - Add Acked-by.
>
> Thanks for pulling!

Ping?
Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-10-27 08:10:03

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [GIT PULL v2] drm: renesas: shmobile: Atomic conversion + DT support (was: Re: [PATCH v4 00/41] drm: renesas: shmobile: Atomic conversion + DT support)

Hi David, Daniel,

On Tue, Oct 24, 2023 at 12:08 PM Geert Uytterhoeven
<[email protected]> wrote:
> On Mon, Oct 16, 2023 at 11:59 AM Geert Uytterhoeven
> <[email protected]> wrote:
> > The following changes since commit 389af786f92ecdff35883551d54bf4e507ffcccb:
> >
> > Merge tag 'drm-intel-next-2023-09-29' of
> > git://anongit.freedesktop.org/drm/drm-intel into drm-next (2023-10-04
> > 13:55:19 +1000)
> >
> > are available in the Git repository at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
> > tags/shmob-drm-atomic-dt-tag2
> >
> > for you to fetch changes up to 1399ebacbf590dfbac4fbba181dd1595b2fa10ba:
> >
> > drm: renesas: shmobile: Add DT support (2023-10-16 11:47:48 +0200)
> >
> > ----------------------------------------------------------------
> > drm: renesas: shmobile: Atomic conversion + DT support
> >
> > Currently, there are two drivers for the LCD controller on Renesas
> > SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs:
> > 1. sh_mobile_lcdcfb, using the fbdev framework,
> > 2. shmob_drm, using the DRM framework.
> > However, only the former driver is used, as all platform support
> > integrates the former. None of these drivers support DT-based systems.
> >
> > Convert the SH-Mobile DRM driver to atomic modesetting, and add DT
> > support, complemented by the customary set of fixes and improvements.
> >
> > Acked-by: Laurent Pinchart <[email protected]>
> > Link: https://lore.kernel.org/r/[email protected]/
> >
> > Changes compared to v1:
> > - Rebase to drm-next,
> > - Add Acked-by.
> >
> > Thanks for pulling!
>
> Ping?
> Thanks!

Please note that this is a hard dependency for adding shmobile-lcdc
device nodes to DTS files, which is in turn a hard dependency for
removing drivers/staging/board/, and for removing legacy clkdev
registration from various clock drivers.

Thanks for pulling!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds