Hi all,
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 can be used, as all platform support
integrates the former. None of these drivers support DT-based systems.
This patch series is a first step to enable the SH-Mobile DRM driver for
Renesas ARM-based SH-Mobile and R-Mobile SoCs. The next steps planned are
to (1) add DT support (works, but needs a hack due to lack of (2)), and (2)
convert the driver to atomic modesetting.
Changes compared to v2[1]:
- Add Reviewed-by.
Changes compared to v1[2]:
- Add Reviewed-by,
- Drop dependency on ARM.
This has been tested on the R-Mobile A1-based Atmark Techno
Armadillo-800-EVA development board, using a temporary
platform-enablement patch[3].
Thanks for applying to drm-misc!
[1] https://lore.kernel.org/r/[email protected]/
[2] https://lore.kernel.org/r/[email protected]/
[3] https://lore.kernel.org/r/c03d4edbd650836bf6a96504df82338ec6d800ff.1680272980.git.geert+renesas@glider.be
Geert Uytterhoeven (5):
drm: shmobile: Use %p4cc to print fourcc codes
drm: shmobile: Add support for DRM_FORMAT_XRGB8888
drm: shmobile: Switch to drm_crtc_init_with_planes()
drm: shmobile: Add missing call to drm_fbdev_generic_setup()
drm: shmobile: Make DRM_SHMOBILE visible on Renesas SoC platforms
drivers/gpu/drm/shmobile/Kconfig | 4 +--
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 35 +++++++++++++++++++---
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 3 ++
drivers/gpu/drm/shmobile/shmob_drm_kms.c | 9 ++++--
drivers/gpu/drm/shmobile/shmob_drm_plane.c | 5 ++++
5 files changed, 48 insertions(+), 8 deletions(-)
--
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
Set up generic fbdev emulation, to enable support for the Linux console.
Use 16 as the preferred depth, as that is a good compromise between
colorfulness and resource utilization, and the default of the fbdev
driver.
Suggested-by: Laurent Pinchart <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
---
v3:
- No changes,
v2:
- Add Reviewed-by.
---
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index faacfee24763b1d4..30493ce874192e3e 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -16,6 +16,7 @@
#include <linux/slab.h>
#include <drm/drm_drv.h>
+#include <drm/drm_fbdev_generic.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_module.h>
#include <drm/drm_probe_helper.h>
@@ -271,6 +272,8 @@ static int shmob_drm_probe(struct platform_device *pdev)
if (ret < 0)
goto err_irq_uninstall;
+ drm_fbdev_generic_setup(ddev, 16);
+
return 0;
err_irq_uninstall:
--
2.34.1
Replace the printing of hexadecimal fourcc format codes by
pretty-printed format names, using the "%p4cc" format specifier.
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
---
v3:
- Add Reviewed-by,
v2:
- Add Reviewed-by.
---
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 ++--
drivers/gpu/drm/shmobile/shmob_drm_kms.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
index d354ab3077cecf94..713a7612244c647a 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
@@ -355,8 +355,8 @@ static int shmob_drm_crtc_mode_set(struct drm_crtc *crtc,
format = shmob_drm_format_info(crtc->primary->fb->format->format);
if (format == NULL) {
- dev_dbg(sdev->dev, "mode_set: unsupported format %08x\n",
- crtc->primary->fb->format->format);
+ dev_dbg(sdev->dev, "mode_set: unsupported format %p4cc\n",
+ &crtc->primary->fb->format->format);
return -EINVAL;
}
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_kms.c b/drivers/gpu/drm/shmobile/shmob_drm_kms.c
index 60a2c8d8a0d947d2..3c5fe3bc183c7c13 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_kms.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_kms.c
@@ -96,8 +96,8 @@ shmob_drm_fb_create(struct drm_device *dev, struct drm_file *file_priv,
format = shmob_drm_format_info(mode_cmd->pixel_format);
if (format == NULL) {
- dev_dbg(dev->dev, "unsupported pixel format %08x\n",
- mode_cmd->pixel_format);
+ dev_dbg(dev->dev, "unsupported pixel format %p4cc\n",
+ &mode_cmd->pixel_format);
return ERR_PTR(-EINVAL);
}
--
2.34.1
Hi
Am 23.05.23 um 17:31 schrieb Geert Uytterhoeven:
> Hi all,
>
> 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 can be used, as all platform support
> integrates the former. None of these drivers support DT-based systems.
>
> This patch series is a first step to enable the SH-Mobile DRM driver for
> Renesas ARM-based SH-Mobile and R-Mobile SoCs. The next steps planned are
> to (1) add DT support (works, but needs a hack due to lack of (2)), and (2)
> convert the driver to atomic modesetting.
>
> Changes compared to v2[1]:
> - Add Reviewed-by.
>
> Changes compared to v1[2]:
> - Add Reviewed-by,
> - Drop dependency on ARM.
>
> This has been tested on the R-Mobile A1-based Atmark Techno
> Armadillo-800-EVA development board, using a temporary
> platform-enablement patch[3].
>
> Thanks for applying to drm-misc!
It's all been reviewed. Do you want me to merge the patchset?
Best regards
Thomas
>
> [1] https://lore.kernel.org/r/[email protected]/
> [2] https://lore.kernel.org/r/[email protected]/
> [3] https://lore.kernel.org/r/c03d4edbd650836bf6a96504df82338ec6d800ff.1680272980.git.geert+renesas@glider.be
>
> Geert Uytterhoeven (5):
> drm: shmobile: Use %p4cc to print fourcc codes
> drm: shmobile: Add support for DRM_FORMAT_XRGB8888
> drm: shmobile: Switch to drm_crtc_init_with_planes()
> drm: shmobile: Add missing call to drm_fbdev_generic_setup()
> drm: shmobile: Make DRM_SHMOBILE visible on Renesas SoC platforms
>
> drivers/gpu/drm/shmobile/Kconfig | 4 +--
> drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 35 +++++++++++++++++++---
> drivers/gpu/drm/shmobile/shmob_drm_drv.c | 3 ++
> drivers/gpu/drm/shmobile/shmob_drm_kms.c | 9 ++++--
> drivers/gpu/drm/shmobile/shmob_drm_plane.c | 5 ++++
> 5 files changed, 48 insertions(+), 8 deletions(-)
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
Hi Thomas,
On Wed, May 24, 2023 at 1:42 PM Thomas Zimmermann <[email protected]> wrote:
> Am 23.05.23 um 17:31 schrieb Geert Uytterhoeven:
> > 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 can be used, as all platform support
> > integrates the former. None of these drivers support DT-based systems.
> >
> > This patch series is a first step to enable the SH-Mobile DRM driver for
> > Renesas ARM-based SH-Mobile and R-Mobile SoCs. The next steps planned are
> > to (1) add DT support (works, but needs a hack due to lack of (2)), and (2)
> > convert the driver to atomic modesetting.
> >
> > Changes compared to v2[1]:
> > - Add Reviewed-by.
> >
> > Changes compared to v1[2]:
> > - Add Reviewed-by,
> > - Drop dependency on ARM.
> >
> > This has been tested on the R-Mobile A1-based Atmark Techno
> > Armadillo-800-EVA development board, using a temporary
> > platform-enablement patch[3].
> >
> > Thanks for applying to drm-misc!
>
> It's all been reviewed. Do you want me to merge the patchset?
That would be great! 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
Am 24.05.23 um 13:54 schrieb Geert Uytterhoeven:
> Hi Thomas,
>
> On Wed, May 24, 2023 at 1:42 PM Thomas Zimmermann <[email protected]> wrote:
>> Am 23.05.23 um 17:31 schrieb Geert Uytterhoeven:
>>> 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 can be used, as all platform support
>>> integrates the former. None of these drivers support DT-based systems.
>>>
>>> This patch series is a first step to enable the SH-Mobile DRM driver for
>>> Renesas ARM-based SH-Mobile and R-Mobile SoCs. The next steps planned are
>>> to (1) add DT support (works, but needs a hack due to lack of (2)), and (2)
>>> convert the driver to atomic modesetting.
>>>
>>> Changes compared to v2[1]:
>>> - Add Reviewed-by.
>>>
>>> Changes compared to v1[2]:
>>> - Add Reviewed-by,
>>> - Drop dependency on ARM.
>>>
>>> This has been tested on the R-Mobile A1-based Atmark Techno
>>> Armadillo-800-EVA development board, using a temporary
>>> platform-enablement patch[3].
>>>
>>> Thanks for applying to drm-misc!
>>
>> It's all been reviewed. Do you want me to merge the patchset?
>
> That would be great! Thanks!
Done. Thanks for the patches.
>
> Gr{oetje,eeting}s,
>
> Geert
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)