diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2014-03-28 10:17:49 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-04-01 16:58:19 -0400 |
commit | 068be56163794c12e0f80d47cdcdb7e7487a05b6 (patch) | |
tree | 8430ed7b67eefa5942310b534ae6d09c6078fde2 /drivers/gpu/drm/i915/intel_display.c | |
parent | 4e6e1a545f65739a8bb87c487e8e23389fdff1b4 (diff) |
drm/i915: Don't store the max cursor width/height in the crtc
Those values are, global, only used in one function and already stored
in mode_config.cursor_{width,height}.
As a result, this initialization code has been moved from the
crtc_init() function to the global modeset_init() one.
I also renamed CURSOR_{WIDTH,HEIGHT} to MAX_CURSOR_{WIDTH,HEIGHT} to be
more accurate about what these value really are.
Cc: Sagar Kamble <sagar.a.kamble@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 451eef73f69c..8a2890f4f923 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -10559,16 +10559,6 @@ static void intel_crtc_init(struct drm_device *dev, int pipe) | |||
10559 | 10559 | ||
10560 | drm_crtc_init(dev, &intel_crtc->base, &intel_crtc_funcs); | 10560 | drm_crtc_init(dev, &intel_crtc->base, &intel_crtc_funcs); |
10561 | 10561 | ||
10562 | if (IS_GEN2(dev)) { | ||
10563 | intel_crtc->max_cursor_width = GEN2_CURSOR_WIDTH; | ||
10564 | intel_crtc->max_cursor_height = GEN2_CURSOR_HEIGHT; | ||
10565 | } else { | ||
10566 | intel_crtc->max_cursor_width = CURSOR_WIDTH; | ||
10567 | intel_crtc->max_cursor_height = CURSOR_HEIGHT; | ||
10568 | } | ||
10569 | dev->mode_config.cursor_width = intel_crtc->max_cursor_width; | ||
10570 | dev->mode_config.cursor_height = intel_crtc->max_cursor_height; | ||
10571 | |||
10572 | drm_mode_crtc_set_gamma_size(&intel_crtc->base, 256); | 10562 | drm_mode_crtc_set_gamma_size(&intel_crtc->base, 256); |
10573 | for (i = 0; i < 256; i++) { | 10563 | for (i = 0; i < 256; i++) { |
10574 | intel_crtc->lut_r[i] = i; | 10564 | intel_crtc->lut_r[i] = i; |
@@ -11319,6 +11309,15 @@ void intel_modeset_init(struct drm_device *dev) | |||
11319 | dev->mode_config.max_width = 8192; | 11309 | dev->mode_config.max_width = 8192; |
11320 | dev->mode_config.max_height = 8192; | 11310 | dev->mode_config.max_height = 8192; |
11321 | } | 11311 | } |
11312 | |||
11313 | if (IS_GEN2(dev)) { | ||
11314 | dev->mode_config.cursor_width = GEN2_CURSOR_WIDTH; | ||
11315 | dev->mode_config.cursor_height = GEN2_CURSOR_HEIGHT; | ||
11316 | } else { | ||
11317 | dev->mode_config.cursor_width = MAX_CURSOR_WIDTH; | ||
11318 | dev->mode_config.cursor_height = MAX_CURSOR_HEIGHT; | ||
11319 | } | ||
11320 | |||
11322 | dev->mode_config.fb_base = dev_priv->gtt.mappable_base; | 11321 | dev->mode_config.fb_base = dev_priv->gtt.mappable_base; |
11323 | 11322 | ||
11324 | DRM_DEBUG_KMS("%d display pipe%s available.\n", | 11323 | DRM_DEBUG_KMS("%d display pipe%s available.\n", |