[PATCH RFC v1 49/52] drm/vmwgfx: Use struct drm_crtc::drm_dev instead of struct drm_crtc::dev
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Jul 12 09:46:59 UTC 2023
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 at pengutronix.de>
---
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++--
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 10 +++++-----
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index b62207be3363..f26b89eee8b0 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -762,7 +762,7 @@ vmw_du_cursor_plane_atomic_update(struct drm_plane *plane,
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
plane);
struct drm_crtc *crtc = new_state->crtc ?: old_state->crtc;
- struct vmw_private *dev_priv = vmw_priv(crtc->dev);
+ struct vmw_private *dev_priv = vmw_priv(crtc->drm_dev);
struct vmw_display_unit *du = vmw_crtc_to_du(crtc);
struct vmw_plane_state *vps = vmw_plane_state_to_vps(new_state);
struct vmw_plane_state *old_vps = vmw_plane_state_to_vps(old_state);
@@ -2240,7 +2240,7 @@ int vmw_du_crtc_gamma_set(struct drm_crtc *crtc,
uint32_t size,
struct drm_modeset_acquire_ctx *ctx)
{
- struct vmw_private *dev_priv = vmw_priv(crtc->dev);
+ struct vmw_private *dev_priv = vmw_priv(crtc->drm_dev);
int i;
for (i = 0; i < size; i++) {
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 556a403b7eb5..5d653a624b74 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -219,7 +219,7 @@ static void vmw_sou_crtc_mode_set_nofb(struct drm_crtc *crtc)
int ret;
sou = vmw_crtc_to_sou(crtc);
- dev_priv = vmw_priv(crtc->dev);
+ dev_priv = vmw_priv(crtc->drm_dev);
ps = crtc->primary->state;
fb = ps->fb;
vps = vmw_plane_state_to_vps(ps);
@@ -303,7 +303,7 @@ static void vmw_sou_crtc_atomic_disable(struct drm_crtc *crtc,
}
sou = vmw_crtc_to_sou(crtc);
- dev_priv = vmw_priv(crtc->dev);
+ dev_priv = vmw_priv(crtc->drm_dev);
if (sou->defined) {
ret = vmw_sou_fifo_destroy(dev_priv, sou);
@@ -384,7 +384,7 @@ vmw_sou_primary_plane_cleanup_fb(struct drm_plane *plane,
plane->state->crtc : old_state->crtc;
if (vps->bo)
- vmw_bo_unpin(vmw_priv(crtc->dev), vps->bo, false);
+ vmw_bo_unpin(vmw_priv(crtc->drm_dev), vps->bo, false);
vmw_bo_unreference(&vps->bo);
vps->bo_size = 0;
@@ -426,7 +426,7 @@ vmw_sou_primary_plane_prepare_fb(struct drm_plane *plane,
}
bo_params.size = new_state->crtc_w * new_state->crtc_h * 4;
- dev_priv = vmw_priv(crtc->dev);
+ dev_priv = vmw_priv(crtc->drm_dev);
if (vps->bo) {
if (vps->bo_size == bo_params.size) {
@@ -730,7 +730,7 @@ vmw_sou_primary_plane_atomic_update(struct drm_plane *plane,
/* In case of device error, maintain consistent atomic state */
if (crtc && new_state->fb) {
- struct vmw_private *dev_priv = vmw_priv(crtc->dev);
+ struct vmw_private *dev_priv = vmw_priv(crtc->drm_dev);
struct vmw_framebuffer *vfb =
vmw_framebuffer_to_vfb(new_state->fb);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index ba0c0e12cfe9..a08d81ea9c94 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -371,7 +371,7 @@ static void vmw_stdu_crtc_mode_set_nofb(struct drm_crtc *crtc)
int x, y, ret;
stdu = vmw_crtc_to_stdu(crtc);
- dev_priv = vmw_priv(crtc->dev);
+ dev_priv = vmw_priv(crtc->drm_dev);
conn_state = stdu->base.connector.state;
vmw_conn_state = vmw_connector_state_to_vcs(conn_state);
@@ -427,7 +427,7 @@ static void vmw_stdu_crtc_atomic_disable(struct drm_crtc *crtc,
}
stdu = vmw_crtc_to_stdu(crtc);
- dev_priv = vmw_priv(crtc->dev);
+ dev_priv = vmw_priv(crtc->drm_dev);
if (stdu->defined) {
ret = vmw_stdu_bind_st(dev_priv, stdu, NULL);
@@ -1363,7 +1363,7 @@ vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
struct vmw_framebuffer *vfb =
vmw_framebuffer_to_vfb(new_state->fb);
stdu = vmw_crtc_to_stdu(crtc);
- dev_priv = vmw_priv(crtc->dev);
+ dev_priv = vmw_priv(crtc->drm_dev);
stdu->display_srf = vps->surf;
stdu->content_fb_type = vps->content_fb_type;
@@ -1385,7 +1385,7 @@ vmw_stdu_primary_plane_atomic_update(struct drm_plane *plane,
} else {
crtc = old_state->crtc;
stdu = vmw_crtc_to_stdu(crtc);
- dev_priv = vmw_priv(crtc->dev);
+ dev_priv = vmw_priv(crtc->drm_dev);
/* Blank STDU when fb and crtc are NULL */
if (!stdu->defined)
--
2.39.2
More information about the dri-devel
mailing list