All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915/bios: rename bios to oprom when mapping pci rom
@ 2019-11-08 21:13 ` Lucas De Marchi
  0 siblings, 0 replies; 14+ messages in thread
From: Lucas De Marchi @ 2019-11-08 21:13 UTC (permalink / raw)
  To: intel-gfx

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@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191108003602.33526-2-lucas.demarchi@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);
 }
 
 /**
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-11-15 17:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-08 21:13 [PATCH 1/3] drm/i915/bios: rename bios to oprom when mapping pci rom Lucas De Marchi
2019-11-08 21:13 ` [Intel-gfx] " Lucas De Marchi
2019-11-08 21:13 ` [PATCH 2/3] drm/i915/bios: make sure to check vbt size Lucas De Marchi
2019-11-08 21:13   ` [Intel-gfx] " Lucas De Marchi
2019-11-08 21:13 ` [PATCH 3/3] drm/i915/bios: do not discard address space Lucas De Marchi
2019-11-08 21:13   ` [Intel-gfx] " Lucas De Marchi
2019-11-15 17:40   ` Ville Syrjälä
2019-11-15 17:40     ` [Intel-gfx] " Ville Syrjälä
2019-11-15 17:45     ` Lucas De Marchi
2019-11-15 17:45       ` [Intel-gfx] " Lucas De Marchi
2019-11-08 21:53 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/bios: rename bios to oprom when mapping pci rom Patchwork
2019-11-08 21:53   ` [Intel-gfx] " Patchwork
2019-11-10 18:59 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-10 18:59   ` [Intel-gfx] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.