From patchwork Thu Jun 7 11:06:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 137869 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1948505lji; Thu, 7 Jun 2018 04:06:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLxwjTwcE3d9RwVFu5X9vqHoKzsoB9jgK4C/LW7WxanVxTu0F19roPt1cs1eHcNrlkc1inH X-Received: by 2002:a65:550d:: with SMTP id f13-v6mr1201519pgr.324.1528369590507; Thu, 07 Jun 2018 04:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528369590; cv=none; d=google.com; s=arc-20160816; b=Wt/Ww0SiT83r5EjzhujA5j3WCBV9dyOWAIpob/NzJpkDd63vif+PasxHNJRUP5HoMs d9DRNHflvYqPrj9KaKEwXGgYUgcAbfURFRV/+jzSJq4FzqyDVwYnqCOWKyYeyXftm56u z+tgEGOVWUXDNYDRsL8U7NnI9FcyDCl/DZMCo4McuaTh96zLYuxisJH4FEJchiqnSkEl /qBKqgvWdiZrLHM2+kHKM9ODrmf5mlpx5hd8yngci+ZG+S8daIAakHMcMLWZBelSZgXu oBZzkzg0XaNwidKABocTSZGGOUyjb8ttw3nfGUO2XGqXuhvskjfAjta20U6lhKim5HOK MZmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=q3dtszU1fVNbXzP4hOcMpV9/SMTmorBEsSwwKRQ6xxk=; b=jzt2zak5wvSClJrfEmqUrTZwul5BBG/7bfyj+FiqyoDsTxuel2mwRzv38j7dBxuSY7 bnyoTmIGiV2Vbm8pPOZ6Lk9QywgLhsUqT2cHBSSexon5bIa8Mq2blLs5ipsLxKMPt7h3 wHxGY+NkrAr/ndO3wDB0Al1ppMMEoczTz9LHP6VbKBXMBCfBmlmQm/dgGfBBXH249xF3 P0vO3z7aXWUA0C/wgAlTyGj4hTXEYmVJs7own5kX6L536IuVOhMFUCSS1kghOzcdLnb7 Gl/XxLlVEEX4xQ7l/ZJmvamgtmLj3t3nYE1OJ0r9HKN5a/aOVfimxvC4+fa0iHjEfjHF Ve9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=FrCQa2H9; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p8-v6si15144102pgd.96.2018.06.07.04.06.30; Thu, 07 Jun 2018 04:06:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=FrCQa2H9; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753280AbeFGLG3 (ORCPT + 3 others); Thu, 7 Jun 2018 07:06:29 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:44694 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752972AbeFGLGZ (ORCPT ); Thu, 7 Jun 2018 07:06:25 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180607110624euoutp010fb48e0f2c388bb8ee2ff46c19a3617b~13AoCZb9c1891918919euoutp01x; Thu, 7 Jun 2018 11:06:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180607110624euoutp010fb48e0f2c388bb8ee2ff46c19a3617b~13AoCZb9c1891918919euoutp01x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1528369584; bh=BNyQ6gEKF+e3e3qEBtXQWC92uBNL6hb0jec45jlWGIQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=FrCQa2H9Bfe8y1KRH8O83GNgDihw2eY62DOcTvGxCAlBL5eWNhXtR+DevgC9uc4jg pvm6dsBr6FfFyP5vkzwocfGzJu3nFfyDD1LOvkHqxnuxjIFptbt7LAPUk65dfJgqBV IwGUiCcded9oXDtd+Z3strtW8inbahLPjuqM6+7s= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180607110623eucas1p1e2172ad92fa08c3b03e77f3ace2384e8~13AnU4xne0960009600eucas1p1j; Thu, 7 Jun 2018 11:06:23 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 9E.B8.05700.FA1191B5; Thu, 7 Jun 2018 12:06:23 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180607110622eucas1p260439bb32091de7d6ca76337c97d2526~13AmpHFtg1566115661eucas1p22; Thu, 7 Jun 2018 11:06:22 +0000 (GMT) X-AuditID: cbfec7f2-1c1ff70000011644-bf-5b1911af0a68 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 3A.AD.04178.EA1191B5; Thu, 7 Jun 2018 12:06:22 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P9Y0097E9IGLAA0@eusync1.samsung.com>; Thu, 07 Jun 2018 12:06:22 +0100 (BST) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Inki Dae , Seung-Woo Kim , Bartlomiej Zolnierkiewicz , Andrzej Pietrasiewicz Subject: [PATCH 7/9] drm/exynos: gsc: Fix DRM_MODE_REFLECT_{X,Y} interpretation Date: Thu, 07 Jun 2018 13:06:12 +0200 Message-id: <20180607110614.335-8-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20180607110614.335-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsWy7djPc7rrBSWjDb6uZ7WY9bKdxWLjDCDr ytf3bBaT7k9gsZhxfh+Txdojd9ktZkx+yebA7nG/+ziTR9+WVYwenzfJBTBHcdmkpOZklqUW 6dslcGXc/XOSveAXb8Xr5/NZGhjXcncxcnJICJhIXJowj6mLkYtDSGAFo8TLWx8ZQRJCAp8Z JfY/NYQpat7/jAWiaBmjxJbNq6CcBiaJTXO/MoFUsQkYSnS97WIDsUUE3CSaDs9kBSliFnjM KLF292Z2kISwQKDE/bZfYDaLgKrE/7X/wdbxClhLdMy8zwaxTl5i9YYDzCA2p4CNxPllm8Du kxD4ySrx/vQ0dogiF4mXK09DNQhLvDq+BSouI9HZcRCqoZlRon3GLHYIp4dRYuucHVAd1hKH j19kBbGZBfgkJm2bDrSOAyjOK9HRJgRR4iHxaMMeaMj0M0osfLqZeQKj5AJGhlWM4qmlxbnp qcWGeanlesWJucWleel6yfm5mxiBEXf63/FPOxi/Xko6xCjAwajEw3vjoXi0EGtiWXFl7iFG CQ5mJRHexEti0UK8KYmVValF+fFFpTmpxYcYpTlYlMR54zTqooQE0hNLUrNTUwtSi2CyTByc Ug2M27eEMxy6eWRhW3t9irH06rt6Ofe83s5d5nVoEUftnRK2zrPtPNpl9Wdm3p/tzcf8VOr6 g8WrJRTzJ5Y0iIVuXd7DXdm7py7X4Fy286bXrc87ZNLkGfd/iV1t0xofaH5aZ3dX01eF+KdO FrtYA0u4w+bydMzdvjN0gYKXosDfrar/nq2oub5fiaU4I9FQi7moOBEAfVVzdrQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHJMWRmVeSWpSXmKPExsVy+t/xy7rrBCWjDZqnK1vMetnOYrFxxnpW iytf37NZTLo/gcVixvl9TBZrj9xlt5gx+SWbA7vH/e7jTB59W1YxenzeJBfAHMVlk5Kak1mW WqRvl8CVcffPSfaCX7wVr5/PZ2lgXMvdxcjJISFgItG8/xlLFyMXh5DAEkaJ2b/mM0M4TUwS LxZ8ZAepYhMwlOh628UGYosIuEk0HZ7JClLELPCYUeLjtlOsIAlhAX+J+w/esoDYLAKqEv/X /mcEsXkFrCU6Zt5ng1gnL7F6wwFmEJtTwEbi/LJNTCC2EFDN2wen2Scw8ixgZFjFKJJaWpyb nltsqFecmFtcmpeul5yfu4kRGCrbjv3cvIPx0sbgQ4wCHIxKPLwN98WjhVgTy4orcw8xSnAw K4nwJl4SixbiTUmsrEotyo8vKs1JLT7EKM3BoiTOe96gMkpIID2xJDU7NbUgtQgmy8TBKdXA yHyg6jvL3a63u3L6Ne0lHV0ZPVjaC1kja2sXTZX7x9jzYMGNWSq7vO1sH+btsEo8Y/zm8TSx gv4w6w/x5/bPui/8yj6l4+PV76s+fnJwmrK2oYGRzWJd/r6/jKJvV62OmtS9YiHX6UV2jOxc bMbb1nBWyc6/f/2l0fzW62dMJ8ScKdlowpySqcRSnJFoqMVcVJwIAFIojYgRAgAA X-CMS-MailID: 20180607110622eucas1p260439bb32091de7d6ca76337c97d2526 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180607110622eucas1p260439bb32091de7d6ca76337c97d2526 References: <20180607110614.335-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Horizontal (DRM_MODE_REFLECT_Y) and vertical (DMR_MODE_REFLECT_Y) flip were swapped in GScaler driver. Fix this by swapping code for interpreting them. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 988b391c886a..97182dadad72 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c @@ -523,30 +523,30 @@ static void gsc_src_set_transf(struct gsc_context *ctx, unsigned int rotation) switch (degree) { case DRM_MODE_ROTATE_0: - if (rotation & DRM_MODE_REFLECT_Y) - cfg |= GSC_IN_ROT_XFLIP; if (rotation & DRM_MODE_REFLECT_X) + cfg |= GSC_IN_ROT_XFLIP; + if (rotation & DRM_MODE_REFLECT_Y) cfg |= GSC_IN_ROT_YFLIP; break; case DRM_MODE_ROTATE_90: cfg |= GSC_IN_ROT_90; - if (rotation & DRM_MODE_REFLECT_Y) - cfg |= GSC_IN_ROT_XFLIP; if (rotation & DRM_MODE_REFLECT_X) + cfg |= GSC_IN_ROT_XFLIP; + if (rotation & DRM_MODE_REFLECT_Y) cfg |= GSC_IN_ROT_YFLIP; break; case DRM_MODE_ROTATE_180: cfg |= GSC_IN_ROT_180; - if (rotation & DRM_MODE_REFLECT_Y) - cfg &= ~GSC_IN_ROT_XFLIP; if (rotation & DRM_MODE_REFLECT_X) + cfg &= ~GSC_IN_ROT_XFLIP; + if (rotation & DRM_MODE_REFLECT_Y) cfg &= ~GSC_IN_ROT_YFLIP; break; case DRM_MODE_ROTATE_270: cfg |= GSC_IN_ROT_270; - if (rotation & DRM_MODE_REFLECT_Y) - cfg &= ~GSC_IN_ROT_XFLIP; if (rotation & DRM_MODE_REFLECT_X) + cfg &= ~GSC_IN_ROT_XFLIP; + if (rotation & DRM_MODE_REFLECT_Y) cfg &= ~GSC_IN_ROT_YFLIP; break; }