Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: bridge: ti-sn65dsi83: Switch to atomic operations

Use the atomic version of the enable/disable operations to continue the
transition to the atomic API, started with the introduction of
.atomic_get_input_bus_fmts(). This will be needed to access the mode
from the atomic state.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210621125518.13715-4-laurent.pinchart@ideasonboard.com

authored by

Laurent Pinchart and committed by
Robert Foss
a6ea7d26 7f0b7f5e

+15 -11
+15 -11
drivers/gpu/drm/bridge/ti-sn65dsi83.c
··· 291 291 return ret; 292 292 } 293 293 294 - static void sn65dsi83_pre_enable(struct drm_bridge *bridge) 294 + static void sn65dsi83_atomic_pre_enable(struct drm_bridge *bridge, 295 + struct drm_bridge_state *old_bridge_state) 295 296 { 296 297 struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); 297 298 ··· 367 366 return dsi_div - 1; 368 367 } 369 368 370 - static void sn65dsi83_enable(struct drm_bridge *bridge) 369 + static void sn65dsi83_atomic_enable(struct drm_bridge *bridge, 370 + struct drm_bridge_state *old_bridge_state) 371 371 { 372 372 struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); 373 373 unsigned int pval; ··· 477 475 regmap_write(ctx->regmap, REG_IRQ_STAT, pval); 478 476 } 479 477 480 - static void sn65dsi83_disable(struct drm_bridge *bridge) 478 + static void sn65dsi83_atomic_disable(struct drm_bridge *bridge, 479 + struct drm_bridge_state *old_bridge_state) 481 480 { 482 481 struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); 483 482 ··· 487 484 regmap_write(ctx->regmap, REG_RC_PLL_EN, 0x00); 488 485 } 489 486 490 - static void sn65dsi83_post_disable(struct drm_bridge *bridge) 487 + static void sn65dsi83_atomic_post_disable(struct drm_bridge *bridge, 488 + struct drm_bridge_state *old_bridge_state) 491 489 { 492 490 struct sn65dsi83 *ctx = bridge_to_sn65dsi83(bridge); 493 491 ··· 579 575 } 580 576 581 577 static const struct drm_bridge_funcs sn65dsi83_funcs = { 582 - .attach = sn65dsi83_attach, 583 - .pre_enable = sn65dsi83_pre_enable, 584 - .enable = sn65dsi83_enable, 585 - .disable = sn65dsi83_disable, 586 - .post_disable = sn65dsi83_post_disable, 587 - .mode_valid = sn65dsi83_mode_valid, 588 - .mode_set = sn65dsi83_mode_set, 578 + .attach = sn65dsi83_attach, 579 + .atomic_pre_enable = sn65dsi83_atomic_pre_enable, 580 + .atomic_enable = sn65dsi83_atomic_enable, 581 + .atomic_disable = sn65dsi83_atomic_disable, 582 + .atomic_post_disable = sn65dsi83_atomic_post_disable, 583 + .mode_valid = sn65dsi83_mode_valid, 584 + .mode_set = sn65dsi83_mode_set, 589 585 590 586 .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, 591 587 .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,