Re: [PATCH 2/2] drm/i915: Crop cursor image for CHV pipe C cursor issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/06/16 09:40, Daniel Vetter wrote:
On Wed, Jun 08, 2016 at 01:57:44PM +0530, Akshu Agrawal wrote:
CHV pipe C hits underrun when we get -ve X values of cursor. To avoid
this we crop the cursor image for by -ve X value and thus use '0' as
least X value.

You're talking about "-ve" here and there's absolutely no "-ve" anywhere
in your patch. That makes your commit message non-understandable.

That's shorthand for "negative", and some of the code below is indeed testing for a negative X coordinate, e.g:

[snip]

+	/*
+	 * There is an issue in CHV PIPE C where we hit underrun on
+	 * -ve value of cursor. To avoid this we are cropping the
+	 *  image for all PIPE C -ve values.
+	 */
+	if (IS_CHERRYVIEW(plane->dev)) {
+		if (pipe == PIPE_C && state->visible &&
+		    state->base.crtc_x < 0) {
+			ret = vlv_cursor_crop(state, crtc_prev_x);
+			if (ret)
+				return -ENOMEM;
+		} else if (crtc_prev_x < 0) { /* Restore the image back */
+			char __iomem *base;
+			char __iomem *org_image = state->vlv_cursor_image;
+			int size = obj->base.size;
+
+			if (org_image == NULL)
+				return -ENOMEM;
+			base = vlv_pin_and_map_buffer_obj(obj);
+			if (base == NULL)
+				return -ENOMEM;
+			memcpy(base, org_image, size);
+			vlv_unpin_buffer_obj(obj, base);
+		}
+	}

HTH,
.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux