drm/i915: Clean up PCI config register handling
Do not use magic numbers, do not prefix stuff with "PCI_", do not declare registers in implementation files. Also move the PCI registers under correct comment in i915_reg.h. v2: - Consistently use BSM (not BDSM or other variants from PRM) (Chris) - Also include register address to help identify the register (Chris) v3: - Refer to register value as *_val instead of *_reg (Chris) v4: - Make style checker happy Cc: Jani Nikula <jani.nikula@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
This commit is contained in:
@@ -504,7 +504,7 @@ static u32 i9xx_get_backlight(struct intel_connector *connector)
|
||||
if (panel->backlight.combination_mode) {
|
||||
u8 lbpc;
|
||||
|
||||
pci_read_config_byte(dev_priv->dev->pdev, PCI_LBPC, &lbpc);
|
||||
pci_read_config_byte(dev_priv->dev->pdev, LBPC, &lbpc);
|
||||
val *= lbpc;
|
||||
}
|
||||
|
||||
@@ -592,7 +592,7 @@ static void i9xx_set_backlight(struct intel_connector *connector, u32 level)
|
||||
|
||||
lbpc = level * 0xfe / panel->backlight.max + 1;
|
||||
level /= lbpc;
|
||||
pci_write_config_byte(dev_priv->dev->pdev, PCI_LBPC, lbpc);
|
||||
pci_write_config_byte(dev_priv->dev->pdev, LBPC, lbpc);
|
||||
}
|
||||
|
||||
if (IS_GEN4(dev_priv)) {
|
||||
|
Reference in New Issue
Block a user