Message ID | 1395742596-20235-1-git-send-email-sagar.a.kamble@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Mar 25, 2014 at 03:46:36PM +0530, sagar.a.kamble@intel.com wrote: > From: Sagar Kamble <sagar.a.kamble@intel.com> > > Cursor size is changed now take care of larger cursor sizes. > wm calculation was hardcoded to 64 before so changing it. > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Damien Lespiau <damien.lespiau@intel.com> > Signed-off-by: Sagar Kamble <sagar.a.kamble@intel.com> > --- > drivers/gpu/drm/i915/intel_pm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index ad58ce3..2177e3d 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -2120,7 +2120,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc, > p->pri.bytes_per_pixel = crtc->fb->bits_per_pixel / 8; > p->cur.bytes_per_pixel = 4; > p->pri.horiz_pixels = intel_crtc->config.pipe_src_w; > - p->cur.horiz_pixels = 64; > + p->cur.horiz_pixels = dev->mode_config.cursor_width; Hum? It seems that mode_config.cursor_width is supposed to have the preferred cursor size so a generic DDX (for instance) can select a size that can be used. If we declare 256x256, that generic driver will use a big buffer for the cursor, without any good reason. A previous patch from you doesn't seem to to do that correctly by always setting the max size, we're fine with the default 64x64 (I just sent a patch to address that). Instead of using the DRM cursor_config value the natural thing to do would be to use the actual width being used (sent patch).
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index ad58ce3..2177e3d 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -2120,7 +2120,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc, p->pri.bytes_per_pixel = crtc->fb->bits_per_pixel / 8; p->cur.bytes_per_pixel = 4; p->pri.horiz_pixels = intel_crtc->config.pipe_src_w; - p->cur.horiz_pixels = 64; + p->cur.horiz_pixels = dev->mode_config.cursor_width; /* TODO: for now, assume primary and cursor planes are always enabled. */ p->pri.enabled = true; p->cur.enabled = true;