[RFC PATCH 2/6] drm: Add skeleton for EPDC driver
Jonathan Neuschäfer
j.neuschaefer at gmx.net
Sat Mar 12 19:41:59 UTC 2022
On Sun, Feb 06, 2022 at 09:00:12AM +0100, Andreas Kemnade wrote:
> This driver is for the EPD controller in the i.MX SoCs. Add a skeleton
> and basic things for the driver
>
> Signed-off-by: Andreas Kemnade <andreas at kemnade.info>
> ---
> drivers/gpu/drm/Kconfig | 2 +
> drivers/gpu/drm/Makefile | 1 +
> drivers/gpu/drm/mxc-epdc/Kconfig | 15 +
> drivers/gpu/drm/mxc-epdc/Makefile | 5 +
> drivers/gpu/drm/mxc-epdc/epdc_regs.h | 442 ++++++++++++++++++++++++
> drivers/gpu/drm/mxc-epdc/mxc_epdc.h | 20 ++
> drivers/gpu/drm/mxc-epdc/mxc_epdc_drv.c | 248 +++++++++++++
> 7 files changed, 733 insertions(+)
> create mode 100644 drivers/gpu/drm/mxc-epdc/Kconfig
> create mode 100644 drivers/gpu/drm/mxc-epdc/Makefile
> create mode 100644 drivers/gpu/drm/mxc-epdc/epdc_regs.h
> create mode 100644 drivers/gpu/drm/mxc-epdc/mxc_epdc.h
> create mode 100644 drivers/gpu/drm/mxc-epdc/mxc_epdc_drv.c
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index b1f22e457fd0..6b6b44ff7556 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -390,6 +390,8 @@ source "drivers/gpu/drm/gud/Kconfig"
>
> source "drivers/gpu/drm/sprd/Kconfig"
>
> +source "drivers/gpu/drm/mxc-epdc/Kconfig"
I'd put it under gpu/drm/imx/epdc, perhaps.
> +int mxc_epdc_output(struct drm_device *drm)
> +{
> + struct mxc_epdc *priv = to_mxc_epdc(drm);
> + int ret;
> +
> + priv->connector.dpms = DRM_MODE_DPMS_OFF;
> + priv->connector.polled = 0;
> + drm_connector_helper_add(&priv->connector,
> + &mxc_epdc_connector_helper_funcs);
> + ret = drm_connector_init(drm, &priv->connector,
> + &mxc_epdc_connector_funcs,
> + DRM_MODE_CONNECTOR_Unknown);
> + if (ret)
> + return ret;
> + ret = of_get_display_timing(drm->dev->of_node, "timing", &priv->timing);
> + if (ret)
> + return ret;
> +
> + return 0;
Possible to simplify to:
return of_get_display_timing(drm->dev->of_node, "timing", &priv->timing);
Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220312/d0b4277c/attachment.sig>
More information about the dri-devel
mailing list