diff mbox series

drm/i915/display: Use intel_bo_to_drm_bo instead of obj->base

Message ID 20231102112219.1039362-1-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: Use intel_bo_to_drm_bo instead of obj->base | expand

Commit Message

Jouni Högander Nov. 2, 2023, 11:22 a.m. UTC
We are preparing for Xe. Xe_bo doesn't have obj->base. Due to this
use intel_bo_to_drm_bo instead in intel_prepare_plane_fb.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula Nov. 2, 2023, 11:52 a.m. UTC | #1
On Thu, 02 Nov 2023, Jouni Högander <jouni.hogander@intel.com> wrote:
> We are preparing for Xe. Xe_bo doesn't have obj->base. Due to this
> use intel_bo_to_drm_bo instead in intel_prepare_plane_fb.
>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_atomic_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 3b9a66923422..06c2455bdd78 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -1096,7 +1096,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
>  		 * can safely continue.
>  		 */
>  		if (new_crtc_state && intel_crtc_needs_modeset(new_crtc_state)) {
> -			ret = add_dma_resv_fences(old_obj->base.resv,
> +			ret = add_dma_resv_fences(intel_bo_to_drm_bo(old_obj)->resv,
>  						  &new_plane_state->uapi);
>  			if (ret < 0)
>  				return ret;
Jouni Högander Nov. 6, 2023, 6:34 a.m. UTC | #2
On Thu, 2023-11-02 at 13:52 +0200, Jani Nikula wrote:
> On Thu, 02 Nov 2023, Jouni Högander <jouni.hogander@intel.com> wrote:
> > We are preparing for Xe. Xe_bo doesn't have obj->base. Due to this
> > use intel_bo_to_drm_bo instead in intel_prepare_plane_fb.
> > 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Thank you Jani for your review. This is now merged.

BR,

Jouni Högander
 
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_atomic_plane.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > index 3b9a66923422..06c2455bdd78 100644
> > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > @@ -1096,7 +1096,7 @@ intel_prepare_plane_fb(struct drm_plane
> > *_plane,
> >                  * can safely continue.
> >                  */
> >                 if (new_crtc_state &&
> > intel_crtc_needs_modeset(new_crtc_state)) {
> > -                       ret = add_dma_resv_fences(old_obj-
> > >base.resv,
> > +                       ret =
> > add_dma_resv_fences(intel_bo_to_drm_bo(old_obj)->resv,
> >                                                   &new_plane_state-
> > >uapi);
> >                         if (ret < 0)
> >                                 return ret;
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index 3b9a66923422..06c2455bdd78 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -1096,7 +1096,7 @@  intel_prepare_plane_fb(struct drm_plane *_plane,
 		 * can safely continue.
 		 */
 		if (new_crtc_state && intel_crtc_needs_modeset(new_crtc_state)) {
-			ret = add_dma_resv_fences(old_obj->base.resv,
+			ret = add_dma_resv_fences(intel_bo_to_drm_bo(old_obj)->resv,
 						  &new_plane_state->uapi);
 			if (ret < 0)
 				return ret;