mirror of https://gitee.com/openkylin/linux.git
drm/i915: Pass dev_priv to rest of IS_FOO() macros for the old platforms
Unify our approach to things by passing around dev_priv instead of dev. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1477946245-14134-22-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
a26e523921
commit
a9097be4f9
|
@ -2723,12 +2723,12 @@ struct drm_i915_cmd_table {
|
|||
|
||||
#define IS_I830(dev_priv) (INTEL_DEVID(dev_priv) == 0x3577)
|
||||
#define IS_845G(dev_priv) (INTEL_DEVID(dev_priv) == 0x2562)
|
||||
#define IS_I85X(dev) (INTEL_INFO(dev)->is_i85x)
|
||||
#define IS_I85X(dev_priv) ((dev_priv)->info.is_i85x)
|
||||
#define IS_I865G(dev_priv) (INTEL_DEVID(dev_priv) == 0x2572)
|
||||
#define IS_I915G(dev) (INTEL_INFO(dev)->is_i915g)
|
||||
#define IS_I915G(dev_priv) ((dev_priv)->info.is_i915g)
|
||||
#define IS_I915GM(dev_priv) (INTEL_DEVID(dev_priv) == 0x2592)
|
||||
#define IS_I945G(dev_priv) (INTEL_DEVID(dev_priv) == 0x2772)
|
||||
#define IS_I945GM(dev) (INTEL_INFO(dev)->is_i945gm)
|
||||
#define IS_I945GM(dev_priv) ((dev_priv)->info.is_i945gm)
|
||||
#define IS_BROADWATER(dev_priv) ((dev_priv)->info.is_broadwater)
|
||||
#define IS_CRESTLINE(dev_priv) ((dev_priv)->info.is_crestline)
|
||||
#define IS_GM45(dev_priv) (INTEL_DEVID(dev_priv) == 0x2A42)
|
||||
|
@ -2736,7 +2736,7 @@ struct drm_i915_cmd_table {
|
|||
#define IS_PINEVIEW_G(dev_priv) (INTEL_DEVID(dev_priv) == 0xa001)
|
||||
#define IS_PINEVIEW_M(dev_priv) (INTEL_DEVID(dev_priv) == 0xa011)
|
||||
#define IS_PINEVIEW(dev_priv) ((dev_priv)->info.is_pineview)
|
||||
#define IS_G33(dev) (INTEL_INFO(dev)->is_g33)
|
||||
#define IS_G33(dev_priv) ((dev_priv)->info.is_g33)
|
||||
#define IS_IRONLAKE_M(dev_priv) (INTEL_DEVID(dev_priv) == 0x0046)
|
||||
#define IS_IVYBRIDGE(dev_priv) ((dev_priv)->info.is_ivybridge)
|
||||
#define IS_IVB_GT1(dev_priv) (INTEL_DEVID(dev_priv) == 0x0156 || \
|
||||
|
|
|
@ -109,7 +109,7 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev)
|
|||
*
|
||||
*/
|
||||
base = 0;
|
||||
if (INTEL_INFO(dev)->gen >= 3) {
|
||||
if (INTEL_GEN(dev_priv) >= 3) {
|
||||
u32 bsm;
|
||||
|
||||
pci_read_config_dword(pdev, INTEL_BSM, &bsm);
|
||||
|
@ -138,7 +138,7 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev)
|
|||
I865_TOUD, &toud);
|
||||
|
||||
base = (toud << 16) + tseg_size;
|
||||
} else if (IS_I85X(dev)) {
|
||||
} else if (IS_I85X(dev_priv)) {
|
||||
u32 tseg_size = 0;
|
||||
u32 tom;
|
||||
u8 tmp;
|
||||
|
|
|
@ -1530,7 +1530,7 @@ static void i9xx_update_wm(struct intel_crtc *unused_crtc)
|
|||
int planea_wm, planeb_wm;
|
||||
struct intel_crtc *crtc, *enabled = NULL;
|
||||
|
||||
if (IS_I945GM(dev))
|
||||
if (IS_I945GM(dev_priv))
|
||||
wm_info = &i945_wm_info;
|
||||
else if (!IS_GEN2(dev_priv))
|
||||
wm_info = &i915_wm_info;
|
||||
|
|
Loading…
Reference in New Issue