[PATCH RFC v1 07/52] drm/ast: 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:17 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/ast/ast_dp.c | 2 +-
drivers/gpu/drm/ast/ast_mode.c | 26 +++++++++++++-------------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c
index 6dc1a09504e1..3438fcbbe1c2 100644
--- a/drivers/gpu/drm/ast/ast_dp.c
+++ b/drivers/gpu/drm/ast/ast_dp.c
@@ -187,7 +187,7 @@ void ast_dp_set_on_off(struct drm_device *dev, bool on)
void ast_dp_set_mode(struct drm_crtc *crtc, struct ast_vbios_mode_info *vbios_mode)
{
- struct ast_device *ast = to_ast_device(crtc->dev);
+ struct ast_device *ast = to_ast_device(crtc->drm_dev);
u32 ulRefreshRateIndex;
u8 ModeIdx;
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index b3c670af6ef2..f685c2e5bb7f 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -1007,7 +1007,7 @@ static int ast_cursor_plane_init(struct ast_device *ast)
static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
{
- struct ast_device *ast = to_ast_device(crtc->dev);
+ struct ast_device *ast = to_ast_device(crtc->drm_dev);
u8 ch = AST_DPMS_VSYNC_OFF | AST_DPMS_HSYNC_OFF;
struct ast_crtc_state *ast_state;
const struct drm_format_info *format;
@@ -1021,12 +1021,12 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x01, 0xdf, 0);
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xfc, 0);
if (ast->tx_chip_types & AST_TX_DP501_BIT)
- ast_set_dp501_video_output(crtc->dev, 1);
+ ast_set_dp501_video_output(crtc->drm_dev, 1);
if (ast->tx_chip_types & AST_TX_ASTDP_BIT) {
- ast_dp_power_on_off(crtc->dev, AST_DP_POWER_ON);
+ ast_dp_power_on_off(crtc->drm_dev, AST_DP_POWER_ON);
ast_wait_for_vretrace(ast);
- ast_dp_set_on_off(crtc->dev, 1);
+ ast_dp_set_on_off(crtc->drm_dev, 1);
}
ast_state = to_ast_crtc_state(crtc->state);
@@ -1048,11 +1048,11 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
case DRM_MODE_DPMS_OFF:
ch = mode;
if (ast->tx_chip_types & AST_TX_DP501_BIT)
- ast_set_dp501_video_output(crtc->dev, 0);
+ ast_set_dp501_video_output(crtc->drm_dev, 0);
if (ast->tx_chip_types & AST_TX_ASTDP_BIT) {
- ast_dp_set_on_off(crtc->dev, 0);
- ast_dp_power_on_off(crtc->dev, AST_DP_POWER_OFF);
+ ast_dp_set_on_off(crtc->drm_dev, 0);
+ ast_dp_power_on_off(crtc->drm_dev, AST_DP_POWER_OFF);
}
ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x01, 0xdf, 0x20);
@@ -1064,7 +1064,7 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
static enum drm_mode_status
ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode)
{
- struct ast_device *ast = to_ast_device(crtc->dev);
+ struct ast_device *ast = to_ast_device(crtc->drm_dev);
enum drm_mode_status status;
uint32_t jtemp;
@@ -1138,7 +1138,7 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
struct ast_crtc_state *old_ast_crtc_state = to_ast_crtc_state(old_crtc_state);
- struct drm_device *dev = crtc->dev;
+ struct drm_device *dev = crtc->drm_dev;
struct ast_crtc_state *ast_state;
const struct drm_format_info *format;
bool succ;
@@ -1188,7 +1188,7 @@ ast_crtc_helper_atomic_flush(struct drm_crtc *crtc,
{
struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
crtc);
- struct drm_device *dev = crtc->dev;
+ struct drm_device *dev = crtc->drm_dev;
struct ast_device *ast = to_ast_device(dev);
struct ast_crtc_state *ast_crtc_state = to_ast_crtc_state(crtc_state);
struct ast_vbios_mode_info *vbios_mode_info = &ast_crtc_state->vbios_mode_info;
@@ -1213,7 +1213,7 @@ ast_crtc_helper_atomic_flush(struct drm_crtc *crtc,
static void ast_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *state)
{
- struct drm_device *dev = crtc->dev;
+ struct drm_device *dev = crtc->drm_dev;
struct ast_device *ast = to_ast_device(dev);
struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
struct ast_crtc_state *ast_crtc_state = to_ast_crtc_state(crtc_state);
@@ -1235,7 +1235,7 @@ static void ast_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atom
static void ast_crtc_helper_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *state)
{
struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc);
- struct drm_device *dev = crtc->dev;
+ struct drm_device *dev = crtc->drm_dev;
struct ast_device *ast = to_ast_device(dev);
ast_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
@@ -1285,7 +1285,7 @@ static struct drm_crtc_state *
ast_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
{
struct ast_crtc_state *new_ast_state, *ast_state;
- struct drm_device *dev = crtc->dev;
+ struct drm_device *dev = crtc->drm_dev;
if (drm_WARN_ON(dev, !crtc->state))
return NULL;
--
2.39.2
More information about the dri-devel
mailing list