drm/lcdif: Clean up headers
Subsystems (4)
Marek Vasut
maintainerPATCH 1/4 drm/lcdif: Clean up headers
Drop unneeded headers, sort rest alphabetically, no functional change.
--- drivers/gpu/drm/mxsfb/lcdif_drv.c | 3 --- drivers/gpu/drm/mxsfb/lcdif_drv.h | 1 + drivers/gpu/drm/mxsfb/lcdif_kms.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/mxsfb/lcdif_drv.c +0 -3
@@ -8,7 +8,6 @@#include <linux/clk.h> #include <linux/dma-mapping.h> #include <linux/io.h> -#include <linux/iopoll.h> #include <linux/module.h> #include <linux/of_device.h> #include <linux/platform_device.h>
@@ -16,10 +15,8 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> -#include <drm/drm_connector.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_mode_config.h>
drivers/gpu/drm/mxsfb/lcdif_drv.h +1 -0
@@ -8,6 +8,7 @@#ifndef __LCDIF_DRV_H__#define __LCDIF_DRV_H__ +#include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_device.h> #include <drm/drm_encoder.h>
drivers/gpu/drm/mxsfb/lcdif_kms.c +1 -1
@@ -16,9 +16,9 @@#include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_encoder.h> -#include <drm/drm_framebuffer.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_fourcc.h> +#include <drm/drm_framebuffer.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane.h>
Signature · 1 line
2.35.1
Marek Vasut
maintainerPATCH 2/4 drm/lcdif: Consistently use plane timings
Drop the crtc_ prefix from mode, consistently use the plane one.
--- drivers/gpu/drm/mxsfb/lcdif_kms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/mxsfb/lcdif_kms.c +4 -4
@@ -122,8 +122,8 @@ static void lcdif_set_mode(struct lcdif_drm_private *lcdif, u32 bus_flags)writel (ctrl, lcdif->base +LCDC_V8_CTRL ); -writel (DISP_SIZE_DELTA_Y (m->crtc_vdisplay) | -DISP_SIZE_DELTA_X (m->crtc_hdisplay), +writel (DISP_SIZE_DELTA_Y (m->vdisplay) | +DISP_SIZE_DELTA_X (m->hdisplay), lcdif->base +LCDC_V8_DISP_SIZE ); writel(HSYN_PARA_BP_H(m->htotal - m->hsync_end) |
@@ -138,8 +138,8 @@ static void lcdif_set_mode(struct lcdif_drm_private *lcdif, u32 bus_flags)VSYN_HSYN_WIDTH_PW_H (m->hsync_end - m->hsync_start), lcdif->base + LCDC_V8_VSYN_HSYN_WIDTH); -writel (CTRLDESCL0_1_HEIGHT (m->crtc_vdisplay) | -CTRLDESCL0_1_WIDTH (m->crtc_hdisplay), +writel (CTRLDESCL0_1_HEIGHT (m->vdisplay) | +CTRLDESCL0_1_WIDTH (m->hdisplay), lcdif->base +LCDC_V8_CTRLDESCL0_1 ); writel(CTRLDESCL0_3_PITCH(lcdif->crtc.primary->state->fb->pitches[0]),
Signature · 1 line
2.35.1
Re: [PATCH 2/4] drm/lcdif: Consistently use plane timings
Quoted 1 line · Marek Vasut
Drop the
crtc_prefix from mode, consistently use the plane one.
s/plane/plain/
Otherwise:
If you want to add my 'Reported-by: Liu Ying <[email protected]>' tag, you may add it.
Quoted 14 lines
Fixes 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIFvariant")
Signed-off-by Marek Vasut <[email protected]>Cc Alexander Stein <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Liu Ying <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Martyn Welch <[email protected]>Cc Peng Fan <[email protected]>Cc Robby Cai <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Stefan Agner <[email protected]>
Marek Vasut
maintainerPATCH 3/4 drm/lcdif: Clean up debug prints and comments
In reply to Marek VasutUpdate debug print to report bridge timings over connector ones. Drop missed comment commit from mxsfb.
--- drivers/gpu/drm/mxsfb/lcdif_kms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/mxsfb/lcdif_kms.c +1 -2
@@ -203,7 +203,7 @@ static void lcdif_crtc_mode_set_nofb(struct lcdif_drm_private *lcdif,DRM_DEV_DEBUG_DRIVER (drm->dev,"Pixel clock: %dkHz (actual: %dkHz)\n" , m->crtc_clock, (int )(clk_get_rate (lcdif->clk) /1000 )); -DRM_DEV_DEBUG_DRIVER (drm->dev,"Connector bus_flags: 0x%08X\n" , +DRM_DEV_DEBUG_DRIVER (drm->dev,"Bridge bus_flags: 0x%08X\n" , bus_flags);DRM_DEV_DEBUG_DRIVER (drm->dev,"Mode flags: 0x%08X\n" , m->flags);
@@ -295,7 +295,6 @@ static void lcdif_crtc_atomic_enable(struct drm_crtc *crtc,lcdif_crtc_mode_set_nofb (lcdif, bridge_state, bus_format); -/* Write cur_buf as well to avoid an initial corrupt frame */ paddr =drm_fb_cma_get_gem_addr (new_pstate->fb, new_pstate,0 );if (paddr) { writel(lower_32_bits(paddr),
Signature · 1 line
2.35.1
Re: [PATCH 3/4] drm/lcdif: Clean up debug prints and comments
Quoted 5 lines · Marek Vasut
Update debug print to report bridge timings over connector ones. Drop missed comment commit from mxsfb.
Fixes 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIFvariant")
Quoted 11 lines
Signed-off-by Marek Vasut <[email protected]>Cc Alexander Stein <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Liu Ying <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Martyn Welch <[email protected]>Cc Peng Fan <[email protected]>Cc Robby Cai <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Stefan Agner <[email protected]>
If you want to add my 'Reported-by: Liu Ying <[email protected]>' tag, you may add it.
Marek Vasut
maintainerPATCH 4/4 drm/lcdif: switch to devm_drm_of_get_bridge
In reply to Marek VasutThe function "drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge".
Switch to the new function and reduce boilerplate.
--- drivers/gpu/drm/mxsfb/lcdif_drv.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)
drivers/gpu/drm/mxsfb/lcdif_drv.c +3 -15
@@ -42,23 +42,11 @@ static int lcdif_attach_bridge(struct lcdif_drm_private *lcdif) {struct drm_device *drm = lcdif->drm;struct drm_bridge *bridge; -struct drm_panel *panel;int ret; - ret =drm_of_find_panel_or_bridge (drm->dev->of_node,0 ,0 , &panel, - &bridge); -if (ret) -return ret; - -if (panel) { - bridge =devm_drm_panel_bridge_add_typed (drm->dev, panel, -DRM_MODE_CONNECTOR_DPI ); -if (IS_ERR (bridge)) -return PTR_ERR (bridge); - } - -if (!bridge) -return -ENODEV ; + bridge =devm_drm_of_get_bridge (drm->dev, drm->dev->of_node,0 ,0 ); +if (IS_ERR (bridge)) +return PTR_ERR (bridge); ret =drm_bridge_attach (&lcdif->encoder, bridge,NULL ,0 );if (ret)
Signature · 1 line
2.35.1
Re: [PATCH 4/4] drm/lcdif: switch to devm_drm_of_get_bridge
Quoted 7 lines · Marek Vasut
The function "
drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge".Switch to the new function and reduce boilerplate.
Fixes 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIFvariant")
Quoted 11 lines
Signed-off-by Marek Vasut <[email protected]>Cc Alexander Stein <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Liu Ying <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Martyn Welch <[email protected]>Cc Peng Fan <[email protected]>Cc Robby Cai <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Stefan Agner <[email protected]>
If you want to add my 'Reported-by: Liu Ying <[email protected]>' tag, you may add it.
Quoted 5 lines · Marek Vasut
Drop unneeded headers, sort rest alphabetically, no functional change.
Fixes 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIFvariant")
Quoted 11 lines
Signed-off-by Marek Vasut <[email protected]>Cc Alexander Stein <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Liu Ying <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Martyn Welch <[email protected]>Cc Peng Fan <[email protected]>Cc Robby Cai <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Stefan Agner <[email protected]>
If you want to add my 'Reported-by: Liu Ying <[email protected]>' tag, you may add it.
Quoted 3 lines · Marek Vasut
Drop unneeded headers, sort rest alphabetically, no functional change.
Series boot tested on top of drm-misc-next-2022-06-30 using Innolux g121x1 LVDS panel connected to NXP i.MX8MP EVK.
Tested in combination with other patches, tree found here:
https://gitlab.collabora.com/martyn/linux/-/tree/6a4cccf50ea793d9e608ccda13468f8645aff6ad
Quoted 72 lines
Fixes 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIFvariant")
Signed-off-by Marek Vasut <[email protected]>Cc Alexander Stein <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Liu Ying <[email protected]>Cc Lucas Stach <[email protected]>Cc Marek Vasut <[email protected]>Cc Martyn Welch <[email protected]>Cc Peng Fan <[email protected]>Cc Robby Cai <[email protected]>Cc Sam Ravnborg <[email protected]>Cc Stefan Agner <[email protected]>---
drivers/gpu/drm/mxsfb/lcdif_drv.c | 3 --- drivers/gpu/drm/mxsfb/lcdif_drv.h | 1 + drivers/gpu/drm/mxsfb/lcdif_kms.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/mxsfb/lcdif_drv.c +0
-1@@ -8,7 +8,6 @@ #include <linux/clk.h> #include <linux/dma-mapping.h> #include <linux/io.h> -#include <linux/iopoll.h> #include <linux/module.h> #include <linux/of_device.h> #include <linux/platform_device.h>@@ -16,10 +15,8 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
-#include <drm/drm_connector.h>
#include <drm/drm_drv.h>
#include <drm/drm_fb_helper.h>
-#include <drm/drm_fourcc.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_mode_config.h>drivers/gpu/drm/mxsfb/lcdif_drv.h +0
-0@@ -8,6 +8,7 @@ #ifndef __LCDIF_DRV_H__ #define __LCDIF_DRV_H__
+#include <drm/drm_bridge.h>
#include <drm/drm_crtc.h>
#include <drm/drm_device.h>
#include <drm/drm_encoder.h>drivers/gpu/drm/mxsfb/lcdif_kms.c +1
-1@@ -16,9 +16,9 @@ #include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_encoder.h> -#include <drm/drm_framebuffer.h> #include <drm/drm_fb_cma_helper.h> #include <drm/drm_fourcc.h> +#include <drm/drm_framebuffer.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane.h>