mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
drm/i915: do not reference i915->display inline
Always use a local variable for display instead of referencing i915->display inline. This makes it easier to convert i915->display into a pointer. Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://lore.kernel.org/r/afcf305e8c4ea452cee37479530958f36a10c840.1746610601.git.jani.nikula@intel.com
This commit is contained in:
parent
bfd43f9d1e
commit
702f530a64
|
|
@ -115,6 +115,8 @@ static const struct drm_driver i915_drm_driver;
|
|||
|
||||
static int i915_workqueues_init(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
struct intel_display *display = &dev_priv->display;
|
||||
|
||||
/*
|
||||
* The i915 workqueue is primarily used for batched retirement of
|
||||
* requests (and thus managing bo) once the task has been completed
|
||||
|
|
@ -133,8 +135,8 @@ static int i915_workqueues_init(struct drm_i915_private *dev_priv)
|
|||
if (dev_priv->wq == NULL)
|
||||
goto out_err;
|
||||
|
||||
dev_priv->display.hotplug.dp_wq = alloc_ordered_workqueue("i915-dp", 0);
|
||||
if (dev_priv->display.hotplug.dp_wq == NULL)
|
||||
display->hotplug.dp_wq = alloc_ordered_workqueue("i915-dp", 0);
|
||||
if (!display->hotplug.dp_wq)
|
||||
goto out_free_wq;
|
||||
|
||||
/*
|
||||
|
|
@ -150,7 +152,7 @@ static int i915_workqueues_init(struct drm_i915_private *dev_priv)
|
|||
return 0;
|
||||
|
||||
out_free_dp_wq:
|
||||
destroy_workqueue(dev_priv->display.hotplug.dp_wq);
|
||||
destroy_workqueue(display->hotplug.dp_wq);
|
||||
out_free_wq:
|
||||
destroy_workqueue(dev_priv->wq);
|
||||
out_err:
|
||||
|
|
@ -161,8 +163,10 @@ static int i915_workqueues_init(struct drm_i915_private *dev_priv)
|
|||
|
||||
static void i915_workqueues_cleanup(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
struct intel_display *display = &dev_priv->display;
|
||||
|
||||
destroy_workqueue(dev_priv->unordered_wq);
|
||||
destroy_workqueue(dev_priv->display.hotplug.dp_wq);
|
||||
destroy_workqueue(display->hotplug.dp_wq);
|
||||
destroy_workqueue(dev_priv->wq);
|
||||
}
|
||||
|
||||
|
|
@ -991,10 +995,10 @@ void i915_driver_shutdown(struct drm_i915_private *i915)
|
|||
if (HAS_DISPLAY(i915))
|
||||
intel_display_driver_suspend_access(display);
|
||||
|
||||
intel_encoder_suspend_all(&i915->display);
|
||||
intel_encoder_shutdown_all(&i915->display);
|
||||
intel_encoder_suspend_all(display);
|
||||
intel_encoder_shutdown_all(display);
|
||||
|
||||
intel_dmc_suspend(&i915->display);
|
||||
intel_dmc_suspend(display);
|
||||
|
||||
i915_gem_suspend(i915);
|
||||
|
||||
|
|
@ -1074,7 +1078,7 @@ static int i915_drm_suspend(struct drm_device *dev)
|
|||
if (HAS_DISPLAY(dev_priv))
|
||||
intel_display_driver_suspend_access(display);
|
||||
|
||||
intel_encoder_suspend_all(&dev_priv->display);
|
||||
intel_encoder_suspend_all(display);
|
||||
|
||||
/* Must be called before GGTT is suspended. */
|
||||
intel_dpt_suspend(display);
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ static void ilk_init_clock_gating(struct drm_i915_private *i915)
|
|||
|
||||
static void cpt_init_clock_gating(struct drm_i915_private *i915)
|
||||
{
|
||||
struct intel_display *display = &i915->display;
|
||||
enum pipe pipe;
|
||||
u32 val;
|
||||
|
||||
|
|
@ -220,7 +221,7 @@ static void cpt_init_clock_gating(struct drm_i915_private *i915)
|
|||
val = intel_uncore_read(&i915->uncore, TRANS_CHICKEN2(pipe));
|
||||
val |= TRANS_CHICKEN2_TIMING_OVERRIDE;
|
||||
val &= ~TRANS_CHICKEN2_FDI_POLARITY_REVERSED;
|
||||
if (i915->display.vbt.fdi_rx_polarity_inverted)
|
||||
if (display->vbt.fdi_rx_polarity_inverted)
|
||||
val |= TRANS_CHICKEN2_FDI_POLARITY_REVERSED;
|
||||
val &= ~TRANS_CHICKEN2_DISABLE_DEEP_COLOR_COUNTER;
|
||||
val &= ~TRANS_CHICKEN2_DISABLE_DEEP_COLOR_MODESWITCH;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user