@@ -15074,18 +15074,18 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev,
if (ret)
goto fail;
- if (INTEL_GEN(dev) >= 9) {
+ if (INTEL_GEN(dev_priv) >= 9) {
supported_rotations =
DRM_ROTATE_0 | DRM_ROTATE_90 |
DRM_ROTATE_180 | DRM_ROTATE_270;
- } else if (INTEL_GEN(dev) >= 4) {
+ } else if (INTEL_GEN(dev_priv) >= 4) {
supported_rotations =
DRM_ROTATE_0 | DRM_ROTATE_180;
} else {
supported_rotations = DRM_ROTATE_0;
}
- if (INTEL_GEN(dev) >= 4)
+ if (INTEL_GEN(dev_priv) >= 4)
drm_plane_create_rotation_property(&primary->base,
DRM_ROTATE_0,
supported_rotations);
@@ -15199,6 +15199,7 @@ static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
{
struct intel_plane *cursor = NULL;
struct intel_plane_state *state = NULL;
+ struct drm_i915_private *dev_priv = to_i915(dev);
int ret;
cursor = kzalloc(sizeof(*cursor), GFP_KERNEL);
@@ -15228,7 +15229,7 @@ static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
if (ret)
goto fail;
- if (INTEL_GEN(dev) >= 4)
+ if (INTEL_GEN(dev_priv) >= 4)
drm_plane_create_rotation_property(&cursor->base,
DRM_ROTATE_0,
DRM_ROTATE_0 |
@@ -1126,7 +1126,7 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane)
goto fail;
}
- if (INTEL_GEN(dev) >= 9) {
+ if (INTEL_GEN(dev_priv) >= 9) {
supported_rotations =
DRM_ROTATE_0 | DRM_ROTATE_90 |
DRM_ROTATE_180 | DRM_ROTATE_270;