[Intel-gfx] [PATCH v5 11/11] drm/i915: Calling rotate and inverse rotate transformations after clipping (original) (raw)

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Feb 10 05:32:57 PST 2014


On Mon, Feb 10, 2014 at 01:01:18PM +0530, sagar.a.kamble at intel.com wrote:

From: Sagar Kamble <sagar.a.kamble at intel.com>

With clipped sprites these transformations are not working. these functions transform complete sprite irrespective of clipping present. This leads to invisible portion of sprite show up when rotate 180 if it was out of visible area before. v4: Moved rotate transform for source rectangle after clipping. Added rotate and inverse rotate transform for destination rect.

Still NAK.

I just pushed rotation support to my glplane test app [1], and with with that my rotated clipping code works exactly as intended.

[1] git://gitorious.org/vsyrjala/glplane.git

Cc: Daniel Vetter <daniel.vetter at ffwll.ch> Cc: Jani Nikula <jani.nikula at linux.intel.com> Cc: David Airlie <airlied at linux.ie> Cc: dri-devel at lists.freedesktop.org Cc: linux-kernel at vger.kernel.org Cc: vijay.a.purushothaman at intel.com Signed-off-by: Sagar Kamble <sagar.a.kamble at intel.com> --- drivers/gpu/drm/i915/intelsprite.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intelsprite.c b/drivers/gpu/drm/i915/intelsprite.c index 62b9f84..799f6a9 100644 --- a/drivers/gpu/drm/i915/intelsprite.c +++ b/drivers/gpu/drm/i915/intelsprite.c @@ -769,9 +769,6 @@ intelupdateplane(struct drmplane *plane, struct drmcrtc *crtc, maxscale = intelplane->maxdownscale << 16;_ _minscale = intelplane->canscale ? 1 : (1 << 16);_ _- drmrectrotate(&src, fb->width << 16, fb->height << 16,_ _- intelplane->rotation); - hscale = drmrectcalchscalerelaxed(&src, &dst, minscale, maxscale); BUGON(hscale < 0);_ _@@ -785,6 +782,13 @@ intelupdateplane(struct drmplane *plane, struct drmcrtc *crtc,_ _crtcw = drmrectwidth(&dst);_ _crtch = drmrectheight(&dst);_ _+ drmrectrotate(&src, fb->width << 16, fb->height << 16,_ _+ intelplane->rotation); + + drmrectrotate(&dst, intelcrtc->config.pipesrcw, + intelcrtc->config.pipesrch, + intelplane->rotation); + if (visible) { /* check again in case clipping clamped the results */ hscale = drmrectcalchscale(&src, &dst, minscale, maxscale); @@ -811,7 +815,11 @@ intelupdateplane(struct drmplane *plane, struct drmcrtc *crtc, drmrectheight(&dst) * vscale - drmrectheight(&src)); drmrectrotateinv(&src, fb->width << 16, fb->height << 16,_ _- intelplane->rotation); + intelplane->rotation); + + drmrectrotateinv(&dst, intelcrtc->config.pipesrcw, + intelcrtc->config.pipesrch, + intelplane->rotation); /* sanity check to make sure the src viewport wasn't enlarged */ WARNON(src.x1 < (int) srcx || -- 1.8.5


Intel-gfx mailing list Intel-gfx at lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- Ville Syrjälä Intel OTC



More information about the dri-devel mailing list