Message ID | 8fd1d38013e3778f40edc574aa135a08b6e0e51e.1722263308.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/xe & drm/i915: drvdata usage changes | expand |
Quoting Jani Nikula (2024-07-29 11:30:09-03:00) >Use to_intel_display() instead of kdev_to_i915() in the HDCP component >API hooks. Avoid further drive-by changes at this point, and just >convert the display pointer to i915, and leave the struct intel_display >conversion for later. > >Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> >--- > drivers/gpu/drm/i915/display/intel_hdcp.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c >index 05402ae6b569..42f8f9d41de6 100644 >--- a/drivers/gpu/drm/i915/display/intel_hdcp.c >+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c >@@ -2181,10 +2181,11 @@ static void intel_hdcp_check_work(struct work_struct *work) > DRM_HDCP_CHECK_PERIOD_MS); > } > >-static int i915_hdcp_component_bind(struct device *i915_kdev, >+static int i915_hdcp_component_bind(struct device *drv_kdev, > struct device *mei_kdev, void *data) > { >- struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); >+ struct intel_display *display = to_intel_display(drv_kdev); >+ struct drm_i915_private *i915 = to_i915(display->drm); > > drm_dbg(&i915->drm, "I915 HDCP comp bind\n"); > mutex_lock(&i915->display.hdcp.hdcp_mutex); >@@ -2195,10 +2196,11 @@ static int i915_hdcp_component_bind(struct device *i915_kdev, > return 0; > } > >-static void i915_hdcp_component_unbind(struct device *i915_kdev, >+static void i915_hdcp_component_unbind(struct device *drv_kdev, > struct device *mei_kdev, void *data) > { >- struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); >+ struct intel_display *display = to_intel_display(drv_kdev); >+ struct drm_i915_private *i915 = to_i915(display->drm); > > drm_dbg(&i915->drm, "I915 HDCP comp unbind\n"); > mutex_lock(&i915->display.hdcp.hdcp_mutex); >-- >2.39.2 >
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index 05402ae6b569..42f8f9d41de6 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -2181,10 +2181,11 @@ static void intel_hdcp_check_work(struct work_struct *work) DRM_HDCP_CHECK_PERIOD_MS); } -static int i915_hdcp_component_bind(struct device *i915_kdev, +static int i915_hdcp_component_bind(struct device *drv_kdev, struct device *mei_kdev, void *data) { - struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); + struct intel_display *display = to_intel_display(drv_kdev); + struct drm_i915_private *i915 = to_i915(display->drm); drm_dbg(&i915->drm, "I915 HDCP comp bind\n"); mutex_lock(&i915->display.hdcp.hdcp_mutex); @@ -2195,10 +2196,11 @@ static int i915_hdcp_component_bind(struct device *i915_kdev, return 0; } -static void i915_hdcp_component_unbind(struct device *i915_kdev, +static void i915_hdcp_component_unbind(struct device *drv_kdev, struct device *mei_kdev, void *data) { - struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); + struct intel_display *display = to_intel_display(drv_kdev); + struct drm_i915_private *i915 = to_i915(display->drm); drm_dbg(&i915->drm, "I915 HDCP comp unbind\n"); mutex_lock(&i915->display.hdcp.hdcp_mutex);
Use to_intel_display() instead of kdev_to_i915() in the HDCP component API hooks. Avoid further drive-by changes at this point, and just convert the display pointer to i915, and leave the struct intel_display conversion for later. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/display/intel_hdcp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)