mirror of
https://github.com/torvalds/linux.git
synced 2026-05-03 22:12:32 -04:00
drm/i915/display: pass display to intel_crtc_for_pipe()
Convert the intel_crtc_for_pipe() struct drm_i915_private parameter to struct intel_display. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240904130633.3831492-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
|
||||
static bool ivb_can_enable_err_int(struct drm_device *dev)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(dev);
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct intel_crtc *crtc;
|
||||
enum pipe pipe;
|
||||
@@ -64,7 +65,7 @@ static bool ivb_can_enable_err_int(struct drm_device *dev)
|
||||
lockdep_assert_held(&dev_priv->irq_lock);
|
||||
|
||||
for_each_pipe(dev_priv, pipe) {
|
||||
crtc = intel_crtc_for_pipe(dev_priv, pipe);
|
||||
crtc = intel_crtc_for_pipe(display, pipe);
|
||||
|
||||
if (crtc->cpu_fifo_underrun_disabled)
|
||||
return false;
|
||||
@@ -75,6 +76,7 @@ static bool ivb_can_enable_err_int(struct drm_device *dev)
|
||||
|
||||
static bool cpt_can_enable_serr_int(struct drm_device *dev)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(dev);
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
enum pipe pipe;
|
||||
struct intel_crtc *crtc;
|
||||
@@ -82,7 +84,7 @@ static bool cpt_can_enable_serr_int(struct drm_device *dev)
|
||||
lockdep_assert_held(&dev_priv->irq_lock);
|
||||
|
||||
for_each_pipe(dev_priv, pipe) {
|
||||
crtc = intel_crtc_for_pipe(dev_priv, pipe);
|
||||
crtc = intel_crtc_for_pipe(display, pipe);
|
||||
|
||||
if (crtc->pch_fifo_underrun_disabled)
|
||||
return false;
|
||||
@@ -282,8 +284,9 @@ static void cpt_set_fifo_underrun_reporting(struct drm_device *dev,
|
||||
static bool __intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
|
||||
enum pipe pipe, bool enable)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(dev);
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
|
||||
struct intel_crtc *crtc = intel_crtc_for_pipe(display, pipe);
|
||||
bool old;
|
||||
|
||||
lockdep_assert_held(&dev_priv->irq_lock);
|
||||
@@ -351,8 +354,9 @@ bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
|
||||
enum pipe pch_transcoder,
|
||||
bool enable)
|
||||
{
|
||||
struct intel_display *display = &dev_priv->display;
|
||||
struct intel_crtc *crtc =
|
||||
intel_crtc_for_pipe(dev_priv, pch_transcoder);
|
||||
intel_crtc_for_pipe(display, pch_transcoder);
|
||||
unsigned long flags;
|
||||
bool old;
|
||||
|
||||
@@ -395,7 +399,8 @@ bool intel_set_pch_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
|
||||
void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
|
||||
enum pipe pipe)
|
||||
{
|
||||
struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
|
||||
struct intel_display *display = &dev_priv->display;
|
||||
struct intel_crtc *crtc = intel_crtc_for_pipe(display, pipe);
|
||||
u32 underruns = 0;
|
||||
|
||||
/* We may be called too early in init, thanks BIOS! */
|
||||
|
||||
Reference in New Issue
Block a user