[Intel-gfx] [PATCH 3/4] drm/i915: Remove uncore from intel_bios.c
Jani Nikula
jani.nikula at linux.intel.com
Mon Aug 29 13:30:00 UTC 2022
On Tue, 23 Aug 2022, Maarten Lankhorst <maarten.lankhorst at linux.intel.com> wrote:
Commit message!
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 25 ++++++++++++-----------
> 1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 198a2f4920cc..c209d0b35041 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -29,9 +29,10 @@
> #include <drm/display/drm_dp_helper.h>
> #include <drm/display/drm_dsc_helper.h>
>
> -#include "display/intel_display.h"
> -#include "display/intel_display_types.h"
> -#include "display/intel_gmbus.h"
> +#include "intel_de.h"
> +#include "intel_display.h"
> +#include "intel_display_types.h"
> +#include "intel_gmbus.h"
>
> #include "i915_drv.h"
> #include "i915_reg.h"
> @@ -2960,16 +2961,16 @@ static struct vbt_header *spi_oprom_get_vbt(struct drm_i915_private *i915)
> u16 vbt_size;
> u32 *vbt;
>
> - static_region = intel_uncore_read(&i915->uncore, SPI_STATIC_REGIONS);
> + static_region = intel_de_read(i915, SPI_STATIC_REGIONS);
> static_region &= OPTIONROM_SPI_REGIONID_MASK;
> - intel_uncore_write(&i915->uncore, PRIMARY_SPI_REGIONID, static_region);
> + intel_de_write(i915, PRIMARY_SPI_REGIONID, static_region);
>
> - oprom_offset = intel_uncore_read(&i915->uncore, OROM_OFFSET);
> + oprom_offset = intel_de_read(i915, OROM_OFFSET);
> oprom_offset &= OROM_OFFSET_MASK;
>
> for (count = 0; count < oprom_size; count += 4) {
> - intel_uncore_write(&i915->uncore, PRIMARY_SPI_ADDRESS, oprom_offset + count);
> - data = intel_uncore_read(&i915->uncore, PRIMARY_SPI_TRIGGER);
> + intel_de_write(i915, PRIMARY_SPI_ADDRESS, oprom_offset + count);
> + data = intel_de_read(i915, PRIMARY_SPI_TRIGGER);
>
> if (data == *((const u32 *)"$VBT")) {
> found = oprom_offset + count;
> @@ -2981,9 +2982,9 @@ static struct vbt_header *spi_oprom_get_vbt(struct drm_i915_private *i915)
> goto err_not_found;
>
> /* Get VBT size and allocate space for the VBT */
> - intel_uncore_write(&i915->uncore, PRIMARY_SPI_ADDRESS, found +
> + intel_de_write(i915, PRIMARY_SPI_ADDRESS, found +
> offsetof(struct vbt_header, vbt_size));
> - vbt_size = intel_uncore_read(&i915->uncore, PRIMARY_SPI_TRIGGER);
> + vbt_size = intel_de_read(i915, PRIMARY_SPI_TRIGGER);
> vbt_size &= 0xffff;
>
> vbt = kzalloc(round_up(vbt_size, 4), GFP_KERNEL);
> @@ -2991,8 +2992,8 @@ static struct vbt_header *spi_oprom_get_vbt(struct drm_i915_private *i915)
> goto err_not_found;
>
> for (count = 0; count < vbt_size; count += 4) {
> - intel_uncore_write(&i915->uncore, PRIMARY_SPI_ADDRESS, found + count);
> - data = intel_uncore_read(&i915->uncore, PRIMARY_SPI_TRIGGER);
> + intel_de_write(i915, PRIMARY_SPI_ADDRESS, found + count);
> + data = intel_de_read(i915, PRIMARY_SPI_TRIGGER);
> *(vbt + store++) = data;
> }
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list