[PATCH v6 0/2] drm/imx/lcdc: Implement DRM driver for imx25

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Mon Mar 6 03:52:47 PST 2023


Hello,

in response to Philipp's reply to v5 here comes a v6. The code changes are:

| diff --git a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
| index c2197fc50306..24bc7b310367 100644
| --- a/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
| +++ b/drivers/gpu/drm/imx/lcdc/imx-lcdc.c
| @@ -7,7 +7,6 @@
|  #include <drm/drm_fbdev_generic.h>
|  #include <drm/drm_fb_dma_helper.h>
|  #include <drm/drm_fourcc.h>
| -#include <drm/drm_fourcc.h>
|  #include <drm/drm_framebuffer.h>
|  #include <drm/drm_gem_atomic_helper.h>
|  #include <drm/drm_gem_dma_helper.h>
| @@ -101,8 +100,6 @@
|  struct imx_lcdc {
|  	struct drm_device drm;
|  	struct drm_simple_display_pipe pipe;
| -	const struct drm_display_mode *mode;
| -	struct drm_bridge *bridge;
|  	struct drm_connector *connector;
|  	void __iomem *base;
|  
| @@ -122,23 +119,17 @@ static inline struct imx_lcdc *imx_lcdc_from_drmdev(struct drm_device *drm)
|  
|  static unsigned int imx_lcdc_get_format(unsigned int drm_format)
|  {
| -	unsigned int bpp;
| -
|  	switch (drm_format) {
|  	default:
|  		DRM_WARN("Format not supported - fallback to XRGB8888\n");
|  		fallthrough;
|  
|  	case DRM_FORMAT_XRGB8888:
| -		bpp = BPP_XRGB8888;
| -		break;
| +		return BPP_XRGB8888;
|  
|  	case DRM_FORMAT_RGB565:
| -		bpp = BPP_RGB565;
| -		break;
| +		return BPP_RGB565;
|  	}
| -
| -	return bpp;
|  }
|  
|  static void imx_lcdc_update_hw_registers(struct drm_simple_display_pipe *pipe,
| @@ -401,6 +392,7 @@ static int imx_lcdc_probe(struct platform_device *pdev)
|  {
|  	struct imx_lcdc *lcdc;
|  	struct drm_device *drm;
| +	struct drm_bridge *bridge;
|  	int irq;
|  	int ret;
|  	struct device *dev = &pdev->dev;
| @@ -416,9 +408,9 @@ static int imx_lcdc_probe(struct platform_device *pdev)
|  	if (IS_ERR(lcdc->base))
|  		return dev_err_probe(dev, PTR_ERR(lcdc->base), "Cannot get IO memory\n");
|  
| -	lcdc->bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
| -	if (IS_ERR(lcdc->bridge))
| -		return dev_err_probe(dev, PTR_ERR(lcdc->bridge), "Failed to find bridge\n");
| +	bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
| +	if (IS_ERR(bridge))
| +		return dev_err_probe(dev, PTR_ERR(bridge), "Failed to find bridge\n");
|  
|  	/* Get Clocks */
|  	lcdc->clk_ipg = devm_clk_get(dev, "ipg");
| @@ -454,7 +446,7 @@ static int imx_lcdc_probe(struct platform_device *pdev)
|  	if (ret < 0)
|  		return dev_err_probe(drm->dev, ret, "Failed to initialize vblank\n");
|  
| -	ret = drm_bridge_attach(&lcdc->pipe.encoder, lcdc->bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
| +	ret = drm_bridge_attach(&lcdc->pipe.encoder, bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
|  	if (ret)
|  		return dev_err_probe(drm->dev, ret, "Cannot attach bridge\n");

(I quoted the patch in the hope that this way it won't interfere with b4
am or whatever is used to pickup this series.)

Other than that I rebased the series to v6.3-rc1 and added the tags by
Rob and Phillip that I got for v5.
 
Marian Cichy (1):
  drm/imx/lcdc: Implement DRM driver for imx25

Uwe Kleine-König (1):
  dt-bindings: display: imx: Describe drm binding for fsl,imx-lcdc

 .../bindings/display/imx/fsl,imx-lcdc.yaml    |  46 +-
 drivers/gpu/drm/imx/Kconfig                   |   1 +
 drivers/gpu/drm/imx/Makefile                  |   1 +
 drivers/gpu/drm/imx/lcdc/Kconfig              |   7 +
 drivers/gpu/drm/imx/lcdc/Makefile             |   1 +
 drivers/gpu/drm/imx/lcdc/imx-lcdc.c           | 545 ++++++++++++++++++
 6 files changed, 600 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/imx/lcdc/Kconfig
 create mode 100644 drivers/gpu/drm/imx/lcdc/Makefile
 create mode 100644 drivers/gpu/drm/imx/lcdc/imx-lcdc.c

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.1




More information about the linux-arm-kernel mailing list