diff mbox series

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

Message ID 20231012072158.4115795-3-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series Frontbuffer tracking preparing for Xe | expand

Commit Message

Jouni Högander Oct. 12, 2023, 7:21 a.m. UTC
Xe and i915 objects have differing implementation. Use intel_bo_to_drm_bo
instead of obj->base as xe_bo doesn't have base pointer.

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

Comments

Juha-Pekka Heikkila Oct. 20, 2023, 1:26 p.m. UTC | #1
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>

On 12.10.2023 10.21, Jouni Högander wrote:
> Xe and i915 objects have differing implementation. Use intel_bo_to_drm_bo
> instead of obj->base as xe_bo doesn't have base pointer.
> 
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_fb.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index e7678571b0d7..e1d298efc510 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -1930,10 +1930,10 @@ static int intel_user_framebuffer_dirty(struct drm_framebuffer *fb,
>   	if (!atomic_read(&front->bits))
>   		return 0;
>   
> -	if (dma_resv_test_signaled(obj->base.resv, dma_resv_usage_rw(false)))
> +	if (dma_resv_test_signaled(intel_bo_to_drm_bo(obj)->resv, dma_resv_usage_rw(false)))
>   		goto flush;
>   
> -	ret = dma_resv_get_singleton(obj->base.resv, dma_resv_usage_rw(false),
> +	ret = dma_resv_get_singleton(intel_bo_to_drm_bo(obj)->resv, dma_resv_usage_rw(false),
>   				     &fence);
>   	if (ret || !fence)
>   		goto flush;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index e7678571b0d7..e1d298efc510 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -1930,10 +1930,10 @@  static int intel_user_framebuffer_dirty(struct drm_framebuffer *fb,
 	if (!atomic_read(&front->bits))
 		return 0;
 
-	if (dma_resv_test_signaled(obj->base.resv, dma_resv_usage_rw(false)))
+	if (dma_resv_test_signaled(intel_bo_to_drm_bo(obj)->resv, dma_resv_usage_rw(false)))
 		goto flush;
 
-	ret = dma_resv_get_singleton(obj->base.resv, dma_resv_usage_rw(false),
+	ret = dma_resv_get_singleton(intel_bo_to_drm_bo(obj)->resv, dma_resv_usage_rw(false),
 				     &fence);
 	if (ret || !fence)
 		goto flush;