diff mbox series

drm/i915/dram: replace __raw_uncore_read32() with intel_uncore_read_fw()

Message ID 20230627105849.274263-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dram: replace __raw_uncore_read32() with intel_uncore_read_fw() | expand

Commit Message

Jani Nikula June 27, 2023, 10:58 a.m. UTC
The __raw_uncore_* interface is supposed to be intel_uncore.[ch]
internal only. Replace the remaining outside user with
intel_uncore_read_fw(), which is essentially the same thing.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/soc/intel_dram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lucas De Marchi July 4, 2023, 1:59 p.m. UTC | #1
On Tue, Jun 27, 2023 at 01:58:49PM +0300, Jani Nikula wrote:
>The __raw_uncore_* interface is supposed to be intel_uncore.[ch]
>internal only. Replace the remaining outside user with
>intel_uncore_read_fw(), which is essentially the same thing.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

as a follow up, could we perhaps move the private-to-uncore functions to
the end of the header is a note that they shouldn't be used directly?
AFAICS the defines would still work fine.

Lucas De Marchi

>---
> drivers/gpu/drm/i915/soc/intel_dram.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
>index 9f0651d48d41..15492b69f698 100644
>--- a/drivers/gpu/drm/i915/soc/intel_dram.c
>+++ b/drivers/gpu/drm/i915/soc/intel_dram.c
>@@ -704,7 +704,7 @@ void intel_dram_edram_detect(struct drm_i915_private *i915)
> 	if (!(IS_HASWELL(i915) || IS_BROADWELL(i915) || GRAPHICS_VER(i915) >= 9))
> 		return;
>
>-	edram_cap = __raw_uncore_read32(&i915->uncore, HSW_EDRAM_CAP);
>+	edram_cap = intel_uncore_read_fw(&i915->uncore, HSW_EDRAM_CAP);
>
> 	/* NB: We can't write IDICR yet because we don't have gt funcs set up */
>
>-- 
>2.39.2
>
Jani Nikula July 4, 2023, 3:21 p.m. UTC | #2
On Tue, 04 Jul 2023, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> On Tue, Jun 27, 2023 at 01:58:49PM +0300, Jani Nikula wrote:
>>The __raw_uncore_* interface is supposed to be intel_uncore.[ch]
>>internal only. Replace the remaining outside user with
>>intel_uncore_read_fw(), which is essentially the same thing.
>>
>>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Thanks, pushed to din.

> as a follow up, could we perhaps move the private-to-uncore functions to
> the end of the header is a note that they shouldn't be used directly?
> AFAICS the defines would still work fine.

That's what the double underscore is supposed to mean, but people like
to abuse that. :p

BR,
Jani.


>
> Lucas De Marchi
>
>>---
>> drivers/gpu/drm/i915/soc/intel_dram.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
>>index 9f0651d48d41..15492b69f698 100644
>>--- a/drivers/gpu/drm/i915/soc/intel_dram.c
>>+++ b/drivers/gpu/drm/i915/soc/intel_dram.c
>>@@ -704,7 +704,7 @@ void intel_dram_edram_detect(struct drm_i915_private *i915)
>> 	if (!(IS_HASWELL(i915) || IS_BROADWELL(i915) || GRAPHICS_VER(i915) >= 9))
>> 		return;
>>
>>-	edram_cap = __raw_uncore_read32(&i915->uncore, HSW_EDRAM_CAP);
>>+	edram_cap = intel_uncore_read_fw(&i915->uncore, HSW_EDRAM_CAP);
>>
>> 	/* NB: We can't write IDICR yet because we don't have gt funcs set up */
>>
>>-- 
>>2.39.2
>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
index 9f0651d48d41..15492b69f698 100644
--- a/drivers/gpu/drm/i915/soc/intel_dram.c
+++ b/drivers/gpu/drm/i915/soc/intel_dram.c
@@ -704,7 +704,7 @@  void intel_dram_edram_detect(struct drm_i915_private *i915)
 	if (!(IS_HASWELL(i915) || IS_BROADWELL(i915) || GRAPHICS_VER(i915) >= 9))
 		return;
 
-	edram_cap = __raw_uncore_read32(&i915->uncore, HSW_EDRAM_CAP);
+	edram_cap = intel_uncore_read_fw(&i915->uncore, HSW_EDRAM_CAP);
 
 	/* NB: We can't write IDICR yet because we don't have gt funcs set up */