diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-09-15 11:53:40 +0300 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-10-16 12:47:46 +0300 |
commit | adceac2cf1929272ddced1352ecd04272890efc5 (patch) | |
tree | acc3a840df251f788e6382dd85efe50052222ee3 /drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | |
parent | fa32c6bc92813a76419d1c306e35394cae5028eb (diff) | |
download | linux-adceac2cf1929272ddced1352ecd04272890efc5.tar.xz |
drm: renesas: shmobile: Move interface handling to connector setup
Move legacy interface handling to the connector setup code.
Set up bus_flags and bus_formats in display_info according to the
bus format and panel information from platform data, to make it more
similar with DT-based connector/bridge/panel setup.
This will allow us to use the same LCD interface setup code for both
legacy and DT-based systems.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/912f615eb87c847804a268200ab57c63453c65d4.1694767209.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c index db4d081fa3d9..a971c7bc1fd4 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c @@ -9,7 +9,6 @@ #include <linux/clk.h> #include <linux/io.h> -#include <linux/media-bus-format.h> #include <linux/mm.h> #include <linux/module.h> #include <linux/platform_device.h> @@ -33,35 +32,6 @@ * Hardware initialization */ -static int shmob_drm_init_interface(struct shmob_drm_device *sdev) -{ - static const struct { - u32 fmt; - u32 ldmt1r; - } bus_fmts[] = { - { MEDIA_BUS_FMT_RGB888_3X8, LDMT1R_MIFTYP_RGB8 }, - { MEDIA_BUS_FMT_RGB666_2X9_BE, LDMT1R_MIFTYP_RGB9 }, - { MEDIA_BUS_FMT_RGB888_2X12_BE, LDMT1R_MIFTYP_RGB12A }, - { MEDIA_BUS_FMT_RGB444_1X12, LDMT1R_MIFTYP_RGB12B }, - { MEDIA_BUS_FMT_RGB565_1X16, LDMT1R_MIFTYP_RGB16 }, - { MEDIA_BUS_FMT_RGB666_1X18, LDMT1R_MIFTYP_RGB18 }, - { MEDIA_BUS_FMT_RGB888_1X24, LDMT1R_MIFTYP_RGB24 }, - { MEDIA_BUS_FMT_UYVY8_1X16, LDMT1R_MIFTYP_YCBCR }, - }; - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(bus_fmts); i++) { - if (bus_fmts[i].fmt == sdev->pdata->iface.bus_fmt) { - sdev->ldmt1r = bus_fmts[i].ldmt1r; - return 0; - } - } - - dev_err(sdev->dev, "unsupported bus format 0x%x\n", - sdev->pdata->iface.bus_fmt); - return -EINVAL; -} - static int shmob_drm_setup_clocks(struct shmob_drm_device *sdev, enum shmob_drm_clk_source clksrc) { @@ -246,10 +216,6 @@ static int shmob_drm_probe(struct platform_device *pdev) if (ret) return ret; - ret = shmob_drm_init_interface(sdev); - if (ret < 0) - return ret; - ret = shmob_drm_modeset_init(sdev); if (ret < 0) return dev_err_probe(&pdev->dev, ret, |