[PATCH RFC v1 05/52] drm/arm: Use struct drm_crtc::drm_dev instead of struct drm_crtc::dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Prepare dropping the alias "dev" for struct drm_crtc::drm_dev. "drm_dev"
is the better name as "dev" is usually a struct device pointer.

No semantic changes.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 .../gpu/drm/arm/display/komeda/komeda_crtc.c  | 24 +++++++++----------
 .../gpu/drm/arm/display/komeda/komeda_kms.c   |  2 +-
 drivers/gpu/drm/arm/hdlcd_crtc.c              |  4 ++--
 drivers/gpu/drm/arm/malidp_crtc.c             |  7 +++---
 4 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
index cea3fd5772b5..7055505818a8 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
@@ -108,7 +108,7 @@ komeda_crtc_atomic_check(struct drm_crtc *crtc,
 static int
 komeda_crtc_prepare(struct komeda_crtc *kcrtc)
 {
-	struct komeda_dev *mdev = kcrtc->base.dev->dev_private;
+	struct komeda_dev *mdev = kcrtc->base.drm_dev->dev_private;
 	struct komeda_pipeline *master = kcrtc->master;
 	struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(kcrtc->base.state);
 	struct drm_display_mode *mode = &kcrtc_st->base.adjusted_mode;
@@ -161,7 +161,7 @@ komeda_crtc_prepare(struct komeda_crtc *kcrtc)
 static int
 komeda_crtc_unprepare(struct komeda_crtc *kcrtc)
 {
-	struct komeda_dev *mdev = kcrtc->base.dev->dev_private;
+	struct komeda_dev *mdev = kcrtc->base.drm_dev->dev_private;
 	struct komeda_pipeline *master = kcrtc->master;
 	u32 new_mode;
 	int err;
@@ -220,7 +220,7 @@ void komeda_crtc_handle_event(struct komeda_crtc   *kcrtc,
 		unsigned long flags;
 		struct drm_pending_vblank_event *event;
 
-		spin_lock_irqsave(&crtc->dev->event_lock, flags);
+		spin_lock_irqsave(&crtc->drm_dev->event_lock, flags);
 		if (kcrtc->disable_done) {
 			complete_all(kcrtc->disable_done);
 			kcrtc->disable_done = NULL;
@@ -236,7 +236,7 @@ void komeda_crtc_handle_event(struct komeda_crtc   *kcrtc,
 			DRM_WARN("CRTC[%d]: FLIP happened but no pending commit.\n",
 				 drm_crtc_index(&kcrtc->base));
 		}
-		spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
+		spin_unlock_irqrestore(&crtc->drm_dev->event_lock, flags);
 	}
 }
 
@@ -246,7 +246,7 @@ komeda_crtc_do_flush(struct drm_crtc *crtc,
 {
 	struct komeda_crtc *kcrtc = to_kcrtc(crtc);
 	struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(crtc->state);
-	struct komeda_dev *mdev = kcrtc->base.dev->dev_private;
+	struct komeda_dev *mdev = kcrtc->base.drm_dev->dev_private;
 	struct komeda_pipeline *master = kcrtc->master;
 	struct komeda_pipeline *slave = kcrtc->slave;
 	struct komeda_wb_connector *wb_conn = kcrtc->wb_conn;
@@ -277,7 +277,7 @@ komeda_crtc_atomic_enable(struct drm_crtc *crtc,
 {
 	struct drm_crtc_state *old = drm_atomic_get_old_crtc_state(state,
 								   crtc);
-	pm_runtime_get_sync(crtc->dev->dev);
+	pm_runtime_get_sync(crtc->drm_dev->dev);
 	komeda_crtc_prepare(to_kcrtc(crtc));
 	drm_crtc_vblank_on(crtc);
 	WARN_ON(drm_crtc_vblank_get(crtc));
@@ -288,7 +288,7 @@ void
 komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
 					 struct completion *input_flip_done)
 {
-	struct drm_device *drm = kcrtc->base.dev;
+	struct drm_device *drm = kcrtc->base.drm_dev;
 	struct komeda_dev *mdev = kcrtc->master->mdev;
 	struct completion *flip_done;
 	struct completion temp;
@@ -378,7 +378,7 @@ komeda_crtc_atomic_disable(struct drm_crtc *crtc,
 	drm_crtc_vblank_put(crtc);
 	drm_crtc_vblank_off(crtc);
 	komeda_crtc_unprepare(kcrtc);
-	pm_runtime_put(crtc->dev->dev);
+	pm_runtime_put(crtc->drm_dev->dev);
 }
 
 static void
@@ -414,7 +414,7 @@ komeda_calc_min_aclk_rate(struct komeda_crtc *kcrtc,
 unsigned long komeda_crtc_get_aclk(struct komeda_crtc_state *kcrtc_st)
 {
 	struct drm_crtc *crtc = kcrtc_st->base.crtc;
-	struct komeda_dev *mdev = crtc->dev->dev_private;
+	struct komeda_dev *mdev = crtc->drm_dev->dev_private;
 	unsigned long pxlclk = kcrtc_st->base.adjusted_mode.crtc_clock * 1000;
 	unsigned long min_aclk;
 
@@ -426,7 +426,7 @@ unsigned long komeda_crtc_get_aclk(struct komeda_crtc_state *kcrtc_st)
 static enum drm_mode_status
 komeda_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *m)
 {
-	struct komeda_dev *mdev = crtc->dev->dev_private;
+	struct komeda_dev *mdev = crtc->drm_dev->dev_private;
 	struct komeda_crtc *kcrtc = to_kcrtc(crtc);
 	struct komeda_pipeline *master = kcrtc->master;
 	unsigned long min_pxlclk, min_aclk;
@@ -532,7 +532,7 @@ static void komeda_crtc_atomic_destroy_state(struct drm_crtc *crtc,
 
 static int komeda_crtc_vblank_enable(struct drm_crtc *crtc)
 {
-	struct komeda_dev *mdev = crtc->dev->dev_private;
+	struct komeda_dev *mdev = crtc->drm_dev->dev_private;
 	struct komeda_crtc *kcrtc = to_kcrtc(crtc);
 
 	mdev->funcs->on_off_vblank(mdev, kcrtc->master->id, true);
@@ -541,7 +541,7 @@ static int komeda_crtc_vblank_enable(struct drm_crtc *crtc)
 
 static void komeda_crtc_vblank_disable(struct drm_crtc *crtc)
 {
-	struct komeda_dev *mdev = crtc->dev->dev_private;
+	struct komeda_dev *mdev = crtc->drm_dev->dev_private;
 	struct komeda_crtc *kcrtc = to_kcrtc(crtc);
 
 	mdev->funcs->on_off_vblank(mdev, kcrtc->master->id, false);
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
index 62dc64550793..2a5fd5d8e524 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
@@ -168,7 +168,7 @@ static int komeda_crtc_normalize_zpos(struct drm_crtc *crtc,
 	INIT_LIST_HEAD(&zorder_list);
 
 	/* This loop also added all effected planes into the new state */
-	drm_for_each_plane_mask(plane, crtc->dev, crtc_st->plane_mask) {
+	drm_for_each_plane_mask(plane, crtc->drm_dev, crtc_st->plane_mask) {
 		plane_st = drm_atomic_get_plane_state(state, plane);
 		if (IS_ERR(plane_st))
 			return PTR_ERR(plane_st);
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
index 3cfefadc7c9d..a1515516fe8b 100644
--- a/drivers/gpu/drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -211,12 +211,12 @@ static void hdlcd_crtc_atomic_begin(struct drm_crtc *crtc,
 	if (event) {
 		crtc->state->event = NULL;
 
-		spin_lock_irq(&crtc->dev->event_lock);
+		spin_lock_irq(&crtc->drm_dev->event_lock);
 		if (drm_crtc_vblank_get(crtc) == 0)
 			drm_crtc_arm_vblank_event(crtc, event);
 		else
 			drm_crtc_send_vblank_event(crtc, event);
-		spin_unlock_irq(&crtc->dev->event_lock);
+		spin_unlock_irq(&crtc->drm_dev->event_lock);
 	}
 }
 
diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
index dc01c43f6193..63761b0b79ec 100644
--- a/drivers/gpu/drm/arm/malidp_crtc.c
+++ b/drivers/gpu/drm/arm/malidp_crtc.c
@@ -52,7 +52,7 @@ static void malidp_crtc_atomic_enable(struct drm_crtc *crtc,
 	struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
 	struct malidp_hw_device *hwdev = malidp->dev;
 	struct videomode vm;
-	int err = pm_runtime_get_sync(crtc->dev->dev);
+	int err = pm_runtime_get_sync(crtc->drm_dev->dev);
 
 	if (err < 0) {
 		DRM_DEBUG_DRIVER("Failed to enable runtime power management: %d\n", err);
@@ -87,7 +87,7 @@ static void malidp_crtc_atomic_disable(struct drm_crtc *crtc,
 
 	clk_disable_unprepare(hwdev->pxlclk);
 
-	err = pm_runtime_put(crtc->dev->dev);
+	err = pm_runtime_put(crtc->drm_dev->dev);
 	if (err < 0) {
 		DRM_DEBUG_DRIVER("Failed to disable runtime power management: %d\n", err);
 	}
@@ -186,7 +186,8 @@ static int malidp_crtc_atomic_check_gamma(struct drm_crtc *crtc,
 		 * changing the gamma LUT doesn't depend on any external
 		 * resources, it is safe to call it only once.
 		 */
-		ret = drm_atomic_helper_check_modeset(crtc->dev, state->state);
+		ret = drm_atomic_helper_check_modeset(crtc->drm_dev,
+						      state->state);
 		if (ret)
 			return ret;
 	}
-- 
2.39.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux