There is no reason to store CRTC id, it's a part of the drm_crtc. Drop
this member and use drm_crtc.name for the warning message.

Signed-off-by: Dmitry Baryshkov <dmitry.barysh...@oss.qualcomm.com>
---
 drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 7 ++-----
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c  | 2 +-
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h  | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c 
b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
index 
5e1e62256c382426f70d21a5312fb40dda68d695..7596b45e234bdcf1b7cf37c4a8d39862f48819a8
 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
@@ -17,7 +17,6 @@
 struct mdp4_crtc {
        struct drm_crtc base;
        char name[8];
-       int id;
        int ovlp;
        enum mdp4_dma dma;
        bool enabled;
@@ -539,7 +538,7 @@ static void mdp4_crtc_wait_for_flush_done(struct drm_crtc 
*crtc)
                        mdp4_crtc->flushed_mask),
                msecs_to_jiffies(50));
        if (ret <= 0)
-               dev_warn(dev->dev, "vblank time out, crtc=%d\n", mdp4_crtc->id);
+               dev_warn(dev->dev, "vblank time out, crtc=%s\n", 
mdp4_crtc->base.name);
 
        mdp4_crtc->flushed_mask = 0;
 
@@ -624,7 +623,7 @@ static void mdp4_crtc_flip_cleanup(struct drm_device *dev, 
void *ptr)
 
 /* initialize crtc */
 struct drm_crtc *mdp4_crtc_init(struct drm_device *dev,
-               struct drm_plane *plane, int id, int ovlp_id,
+               struct drm_plane *plane, int ovlp_id,
                enum mdp4_dma dma_id)
 {
        struct drm_crtc *crtc = NULL;
@@ -639,8 +638,6 @@ struct drm_crtc *mdp4_crtc_init(struct drm_device *dev,
 
        crtc = &mdp4_crtc->base;
 
-       mdp4_crtc->id = id;
-
        mdp4_crtc->ovlp = ovlp_id;
        mdp4_crtc->dma = dma_id;
 
diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c 
b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
index 
7e942c1337b3597d557abd3e2e418c3958e5eb3f..00920bd44f6f73099ff2c293473e427caa49b873
 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
@@ -338,7 +338,7 @@ static int modeset_init(struct mdp4_kms *mdp4_kms)
                        goto fail;
                }
 
-               crtc  = mdp4_crtc_init(dev, plane, priv->num_crtcs, i,
+               crtc  = mdp4_crtc_init(dev, plane, i,
                                mdp4_crtcs[i]);
                if (IS_ERR(crtc)) {
                        DRM_DEV_ERROR(dev->dev, "failed to construct crtc for 
%s\n",
diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h 
b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h
index 
f9d988076337cb6fb63af8e76be59b2eb34ab327..fb348583dc84de5c57c77fdf246894e9334af514
 100644
--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h
@@ -185,7 +185,7 @@ void mdp4_crtc_set_config(struct drm_crtc *crtc, uint32_t 
config);
 void mdp4_crtc_set_intf(struct drm_crtc *crtc, enum mdp4_intf intf, int mixer);
 void mdp4_crtc_wait_for_commit_done(struct drm_crtc *crtc);
 struct drm_crtc *mdp4_crtc_init(struct drm_device *dev,
-               struct drm_plane *plane, int id, int ovlp_id,
+               struct drm_plane *plane, int ovlp_id,
                enum mdp4_dma dma_id);
 
 long mdp4_dtv_round_pixclk(struct drm_encoder *encoder, unsigned long rate);

-- 
2.39.5

Reply via email to