Skip to content

Commit 6068bc2

Browse files
committed
drm/i915/dsi: pass display to register macros instead of implicit variable
Stop relying on the dev_priv local variable in the DSI register macros. Pass struct intel_display pointer to the macros. Move the MIPI DSI MMIO base selection to a different level, passing it to _MMIO_MIPI() and doing the addition there. Start using the local display variable for all intel_de_* usage, and opportunistically use it for other things than display registers as well. Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/6dd52f3fce3527242479aadc276d05de74ceae5d.1713520813.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 4cfff96 commit 6068bc2

File tree

4 files changed

+349
-342
lines changed

4 files changed

+349
-342
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3722,8 +3722,8 @@ static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc,
37223722
struct intel_crtc_state *pipe_config,
37233723
struct intel_display_power_domain_set *power_domain_set)
37243724
{
3725-
struct drm_device *dev = crtc->base.dev;
3726-
struct drm_i915_private *dev_priv = to_i915(dev);
3725+
struct intel_display *display = to_intel_display(crtc);
3726+
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
37273727
enum transcoder cpu_transcoder;
37283728
enum port port;
37293729
u32 tmp;
@@ -3749,11 +3749,11 @@ static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc,
37493749
break;
37503750

37513751
/* XXX: this works for video mode only */
3752-
tmp = intel_de_read(dev_priv, BXT_MIPI_PORT_CTRL(port));
3752+
tmp = intel_de_read(display, BXT_MIPI_PORT_CTRL(port));
37533753
if (!(tmp & DPI_ENABLE))
37543754
continue;
37553755

3756-
tmp = intel_de_read(dev_priv, MIPI_CTRL(port));
3756+
tmp = intel_de_read(display, MIPI_CTRL(display, port));
37573757
if ((tmp & BXT_PIPE_SELECT_MASK) != BXT_PIPE_SELECT(crtc->pipe))
37583758
continue;
37593759

0 commit comments

Comments
 (0)