]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/gpu/drm/i915/intel_panel.c
drm/i915: Assorted INTEL_INFO(dev) cleanups
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / i915 / intel_panel.c
index be4b4d546fd9f258171986c815fa3257fdb17338..374a733864d4bd097958e47227967c79ceef55f4 100644 (file)
@@ -304,7 +304,7 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
                              struct intel_crtc_state *pipe_config,
                              int fitting_mode)
 {
-       struct drm_device *dev = intel_crtc->base.dev;
+       struct drm_i915_private *dev_priv = to_i915(intel_crtc->base.dev);
        u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0;
        struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode;
 
@@ -325,7 +325,7 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
                break;
        case DRM_MODE_SCALE_ASPECT:
                /* Scale but preserve the aspect ratio */
-               if (INTEL_INFO(dev)->gen >= 4)
+               if (INTEL_GEN(dev_priv) >= 4)
                        i965_scale_aspect(pipe_config, &pfit_control);
                else
                        i9xx_scale_aspect(pipe_config, &pfit_control,
@@ -339,7 +339,7 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
                if (pipe_config->pipe_src_h != adjusted_mode->crtc_vdisplay ||
                    pipe_config->pipe_src_w != adjusted_mode->crtc_hdisplay) {
                        pfit_control |= PFIT_ENABLE;
-                       if (INTEL_INFO(dev)->gen >= 4)
+                       if (INTEL_GEN(dev_priv) >= 4)
                                pfit_control |= PFIT_SCALING_AUTO;
                        else
                                pfit_control |= (VERT_AUTO_SCALE |
@@ -355,7 +355,7 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc,
 
        /* 965+ wants fuzzy fitting */
        /* FIXME: handle multiple panels by failing gracefully */
-       if (INTEL_INFO(dev)->gen >= 4)
+       if (INTEL_GEN(dev_priv) >= 4)
                pfit_control |= ((intel_crtc->pipe << PFIT_PIPE_SHIFT) |
                                 PFIT_FILTER_FUZZY);
 
@@ -366,7 +366,7 @@ out:
        }
 
        /* Make sure pre-965 set dither correctly for 18bpp panels. */
-       if (INTEL_INFO(dev)->gen < 4 && pipe_config->pipe_bpp == 18)
+       if (INTEL_GEN(dev_priv) < 4 && pipe_config->pipe_bpp == 18)
                pfit_control |= PANEL_8TO6_DITHER_ENABLE;
 
        pipe_config->gmch_pfit.control = pfit_control;