[Intel-gfx] [PATCH 2/4] drm/i915/bios: rename bios to oprom when mapping pci rom
Jani Nikula
jani.nikula at linux.intel.com
Fri Nov 8 10:01:46 UTC 2019
On Thu, 07 Nov 2019, Lucas De Marchi <lucas.demarchi at intel.com> wrote:
> oprom is actually a better name to use when using
> pci_map_rom(). "bios" is way too generic and confusing.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index a03f56b7b4ef..1f83616cfc32 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1804,7 +1804,7 @@ bool intel_bios_is_valid_vbt(const void *buf, size_t size)
> return vbt;
> }
>
> -static const struct vbt_header *find_vbt(void __iomem *bios, size_t size)
> +static const struct vbt_header *find_vbt(void __iomem *oprom, size_t size)
> {
> size_t i;
>
> @@ -1812,14 +1812,14 @@ static const struct vbt_header *find_vbt(void __iomem *bios, size_t size)
> for (i = 0; i + 4 < size; i++) {
> void *vbt;
>
> - if (ioread32(bios + i) != *((const u32 *) "$VBT"))
> + if (ioread32(oprom + i) != *((const u32 *)"$VBT"))
> continue;
>
> /*
> * This is the one place where we explicitly discard the address
> * space (__iomem) of the BIOS/VBT.
> */
> - vbt = (void __force *) bios + i;
> + vbt = (void __force *)oprom + i;
> if (intel_bios_is_valid_vbt(vbt, size - i))
> return vbt;
>
> @@ -1842,7 +1842,7 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
> struct pci_dev *pdev = dev_priv->drm.pdev;
> const struct vbt_header *vbt = dev_priv->opregion.vbt;
> const struct bdb_header *bdb;
> - u8 __iomem *bios = NULL;
> + u8 __iomem *oprom = NULL;
>
> if (!HAS_DISPLAY(dev_priv) || !INTEL_DISPLAY_ENABLED(dev_priv)) {
> DRM_DEBUG_KMS("Skipping VBT init due to disabled display.\n");
> @@ -1855,11 +1855,11 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
> if (!vbt) {
> size_t size;
>
> - bios = pci_map_rom(pdev, &size);
> - if (!bios)
> + oprom = pci_map_rom(pdev, &size);
> + if (!oprom)
> goto out;
>
> - vbt = find_vbt(bios, size);
> + vbt = find_vbt(oprom, size);
> if (!vbt)
> goto out;
>
> @@ -1893,8 +1893,8 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
> init_vbt_missing_defaults(dev_priv);
> }
>
> - if (bios)
> - pci_unmap_rom(pdev, bios);
> + if (oprom)
> + pci_unmap_rom(pdev, oprom);
> }
>
> /**
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list