Skip to content

Commit 0df0c76

Browse files
committed
drm/i915/guc: Remove plain ads_blob pointer
Now we have the access to content of GuC ADS either using iosys_map API or using a temporary buffer. Remove guc->ads_blob as there shouldn't be updates using the bare pointer anymore. Cc: Matt Roper <[email protected]> Cc: Thomas Hellström <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: John Harrison <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Daniele Ceraolo Spurio <[email protected]> Signed-off-by: Lucas De Marchi <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 691ebb1 commit 0df0c76

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

drivers/gpu/drm/i915/gt/uc/intel_guc.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ struct intel_guc {
147147

148148
/** @ads_vma: object allocated to hold the GuC ADS */
149149
struct i915_vma *ads_vma;
150-
/** @ads_blob: contents of the GuC ADS */
151-
struct __guc_ads_blob *ads_blob;
150+
/** @ads_map: contents of the GuC ADS */
152151
struct iosys_map ads_map;
153152
/** @ads_regset_size: size of the save/restore regsets in the ADS */
154153
u32 ads_regset_size;

drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,7 @@ static void __guc_ads_init(struct intel_guc *guc)
667667
*/
668668
int intel_guc_ads_create(struct intel_guc *guc)
669669
{
670+
void *ads_blob;
670671
u32 size;
671672
int ret;
672673

@@ -691,14 +692,14 @@ int intel_guc_ads_create(struct intel_guc *guc)
691692
size = guc_ads_blob_size(guc);
692693

693694
ret = intel_guc_allocate_and_map_vma(guc, size, &guc->ads_vma,
694-
(void **)&guc->ads_blob);
695+
&ads_blob);
695696
if (ret)
696697
return ret;
697698

698699
if (i915_gem_object_is_lmem(guc->ads_vma->obj))
699-
iosys_map_set_vaddr_iomem(&guc->ads_map, (void __iomem *)guc->ads_blob);
700+
iosys_map_set_vaddr_iomem(&guc->ads_map, (void __iomem *)ads_blob);
700701
else
701-
iosys_map_set_vaddr(&guc->ads_map, guc->ads_blob);
702+
iosys_map_set_vaddr(&guc->ads_map, ads_blob);
702703

703704
__guc_ads_init(guc);
704705

@@ -720,7 +721,6 @@ void intel_guc_ads_init_late(struct intel_guc *guc)
720721
void intel_guc_ads_destroy(struct intel_guc *guc)
721722
{
722723
i915_vma_unpin_and_release(&guc->ads_vma, I915_VMA_RELEASE_MAP);
723-
guc->ads_blob = NULL;
724724
iosys_map_clear(&guc->ads_map);
725725
kfree(guc->ads_regset);
726726
}

0 commit comments

Comments
 (0)