From patchwork Thu Nov 5 14:01:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 11884485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A1E3C4741F for ; Thu, 5 Nov 2020 14:03:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90AEB2074B for ; Thu, 5 Nov 2020 14:03:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="onJEytaw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="X0MVHzAj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90AEB2074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=o5Y49/WAzuftcE6QjKfbAtrRZiOZ3ghj8zsRbXCojWA=; b=onJEytawrGrS7hzCusnwjSvGu hDhiHrWOEVRw6+NltS5cwuDDHkslKKOGTvx082SM5DP6NAow03RfFLO7iA0eEeUOgvPdFj3cvKhjB 3IgeMTLoFiSByTFvWQzw1bwjM0j8zVDikWNgHA6g/HvZhj4WJC9BRekFmWByn6OjgoFSfw5fpLVae 9RImCTJueVRcte3Ky1ta9NfeFw00HZhKH8X46o00AncFQqOesWk/cTrgMyUkhL6r3tagiqJH3zEaA 9Fj98PjwSClx1pEvsw/8MSJRFsgaiVOnHhHdpy10kLU+jBXkGRdQWoAVSF3iDNquufyzVqLtjnwSK FBAsXOCaA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kafqC-0005dK-H9; Thu, 05 Nov 2020 14:02:16 +0000 Received: from mail-eopbgr50040.outbound.protection.outlook.com ([40.107.5.40] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kafq9-0005cC-Eh for linux-arm-kernel@lists.infradead.org; Thu, 05 Nov 2020 14:02:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O28JFvt651g1oT/nqb1TcnMv1wd/UqvyqRMqmQOVLTficCncSTI3l12e+Er0yT4on2V8J+aSrOw5091NBswXUwl9sxxsjnEOv7cLy/BafLDdVuVrJppgi/1a0xOInaU1f0wnYD5/GD6AVYF89qxDJ8efoyv3BZ+YNVv3v6SUjvGLjqfpTnIjJK6fpgPB8RSC7aK3woTa7lu0H0d0hYez+dpmsu5CAM2bwMA4txPuq2Vghj8+a9soB+V5ltZyVTdW1eZn0LckU1yWHnVZs4tc/z6oim8Pv09HVMfmj2fKSVH5+CMzIEdiDVznxXarb7XgGHhfuFIP4wWOe6IefcaH8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R9vob6+exkqWS69bcbRacyP8nAzMKeqPd6B8Ph05QXc=; b=On5TQZ4iJxxLWg9p4/1lsK7gyKlyejrQzqDkBdiKexmcTvto2ecQU560ffo4TOHLucBEj5OixqvJSWdStaOFoqPq0H2IRsgE0AQEM35SsTzQ/gu19iWca4hNlyjwgPUNSIO8+pneJ6mMbBFVnmVzgkJHVZD1x/0GUVYPNGqcW0hzfpf2pcKZPLUZ1LbnTxfCKZYBCufCi+sySfe/bN/CbW+RVh0x/YsBdV0fcRqHgzBXNk0WOVVggjhq0IfZ2apsB7fNIb4D2PlV5c8ZXhD9yfGZgkJItdHBx1N/+KwCXho0htPyUhh2sImwTU51O5vl6EmQ+awC4IQUijC5X8VgTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R9vob6+exkqWS69bcbRacyP8nAzMKeqPd6B8Ph05QXc=; b=X0MVHzAjU4o28HYRqw4CjuC0la+miAv/UU8Nnli9ZwDWE8sWOoZYKYz5pIlBlZqgpZRPAvmdv79Xfp4AXMaZk7lfUZ7SZ0GmleDvZrh06tz+hkbKED0fucksc7sSaTyj/YwPHZX4GYys/y+jmB+ZtjugAvHZa1J8pY3enufG8F8= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) by VI1PR04MB6783.eurprd04.prod.outlook.com (2603:10a6:803:130::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Thu, 5 Nov 2020 14:02:11 +0000 Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::f000:d709:509:bb5]) by VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::f000:d709:509:bb5%3]) with mapi id 15.20.3499.032; Thu, 5 Nov 2020 14:02:11 +0000 From: Laurentiu Palcu To: Lucas Stach , Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , =?utf-8?q?Guido_G=C3=BCnther?= Subject: [PATCH 1/2] drm/imx/dcss: fix rotations for Vivante tiled formats Date: Thu, 5 Nov 2020 16:01:25 +0200 Message-Id: <20201105140127.25249-2-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201105140127.25249-1-laurentiu.palcu@oss.nxp.com> References: <20201105140127.25249-1-laurentiu.palcu@oss.nxp.com> X-Originating-IP: [83.217.231.2] X-ClientProxiedBy: AM3PR07CA0084.eurprd07.prod.outlook.com (2603:10a6:207:6::18) To VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-141.ea.freescale.net (83.217.231.2) by AM3PR07CA0084.eurprd07.prod.outlook.com (2603:10a6:207:6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.15 via Frontend Transport; Thu, 5 Nov 2020 14:02:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d13d25e6-b136-4413-3ea8-08d8819363df X-MS-TrafficTypeDiagnostic: VI1PR04MB6783: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OlrqEQR7nsPctIbtLukdMjz1rlHOH0lGFpoWZs2hONyvB2i9VjE6BaGzUTQPf4DvwelAl1R0BbKPA0N74boLfuByx1IJdcoAqqjDDzErub/HBGWwgEjkwp1rxko8d42DHTbgcEsAQSafWNiCMH/1Zues0wfAJxKJ7VglkLjBDpB9NxcwfYMlNQkeTHIZ2BxIIQJY5IR9Xx7vMo2uycF1FV5FQxREWFj1pcPv4bHyQ4UiPuwetl76KH2VK5Onj7cQufUXkCRGKaQP2gfacElHieXpYQGE4dubST8JmDRhq6vL9larZphfxq5sDNbm2GVtrdSyMyy7DOYYzd7qBujPNoWBzLe4YPE6McHsgGbE/xs= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3902.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(376002)(136003)(346002)(8676002)(2616005)(956004)(6512007)(44832011)(83380400001)(6666004)(8936002)(66946007)(2906002)(6486002)(66476007)(66556008)(7416002)(316002)(4326008)(52116002)(86362001)(478600001)(5660300002)(1076003)(6506007)(186003)(26005)(16526019)(110136005)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: yOgm+zg2p6koS7k/ttomf9tyMGiNNAXnrZt6FgwCzilifNVu7ptKn8hvt0jOFL9IGRs6dnZeH0xRLJAvowTA43o0cFruIqa/WchF2TiNAKx8Uovf5dlQMgwAKpUKutgEuFH/6msO1okmER/pV1AYD1JL7zHGvqHnLENiGiX7xfQ1pwMvoWA1GpPONVsE2Z/RczAiOi8i6yiqdRR7ED9KjKNKqcdt2sqE1mtt6uZ12e/HT9oaTaDOK8QoFqSTb5fP6UAr1rJxXbjr4wOsKgZI9tCscyPnQbr95uuuQm00BKtPNzsBIAorxsSKrHC40aXfm7vyrWhj+C4q9csg4SRjXxrwN9D7CI7pciCYDsjT495EAJrmo9pTeMWvMM81yIc+NeI1fApfFsKPYaX77RZ8MT4UW99FCwCgWRje8ULWsdX8ggl3E+K7iauYJdLAcQNTrdS1CwN93GS2FdN3Fhexi5eL7LKxKmKhIagUKtkjUtt45WasjE2MWaEWLi+RjZM6B6og9bseX3GhH5P0097JQnp2hQ7xOhGq1n4W31Nj1tAnB907+zj/hty4ipqGhv6hJ5nP2kcRLWL8Kne6zoMM/By6WH2zR5f2b/vUI2GydcG+RKZESYdH2frtiktWVGtNcGN+XyyagNLt95B/r11WWQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d13d25e6-b136-4413-3ea8-08d8819363df X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3902.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2020 14:02:11.0367 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 26aq0Yg/L3Ggmig1mplWKUwjQXbwDHjLV5ms+vTUD7ZUv6zxuOXCxmRkGUQ3AM+rzIm3TDEQOQIsG71y0xmBMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6783 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201105_090213_560908_71E045D6 X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurentiu Palcu , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DCSS supports 90/180/270 degree rotations for Vivante tiled and super-tiled formats. Unfortunately, with the current code, they didn't work properly. This simple patch makes the rotations work by fixing the way the scaler is set up for 90/270 degree rotations. In this particular case, the source width and height need to be swapped since DPR is sending the buffer to scaler already rotated. Also, make sure to allow full rotations for DRM_FORMAT_MOD_VIVANTE_SUPER_TILED. Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Laurentiu Palcu --- drivers/gpu/drm/imx/dcss/dcss-plane.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-plane.c b/drivers/gpu/drm/imx/dcss/dcss-plane.c index e13652e3a115..46a188dd02ad 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-plane.c +++ b/drivers/gpu/drm/imx/dcss/dcss-plane.c @@ -111,7 +111,8 @@ static bool dcss_plane_can_rotate(const struct drm_format_info *format, supported_rotation = DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180 | DRM_MODE_REFLECT_MASK; else if (!format->is_yuv && - modifier == DRM_FORMAT_MOD_VIVANTE_TILED) + (modifier == DRM_FORMAT_MOD_VIVANTE_TILED || + modifier == DRM_FORMAT_MOD_VIVANTE_SUPER_TILED)) supported_rotation = DRM_MODE_ROTATE_MASK | DRM_MODE_REFLECT_MASK; else if (format->is_yuv && linear_format && @@ -272,6 +273,7 @@ static void dcss_plane_atomic_update(struct drm_plane *plane, u32 src_w, src_h, dst_w, dst_h; struct drm_rect src, dst; bool enable = true; + bool is_rotation_90_or_270; if (!fb || !state->crtc || !state->visible) return; @@ -309,8 +311,13 @@ static void dcss_plane_atomic_update(struct drm_plane *plane, dcss_plane_atomic_set_base(dcss_plane); + is_rotation_90_or_270 = state->rotation & (DRM_MODE_ROTATE_90 | + DRM_MODE_ROTATE_270); + dcss_scaler_setup(dcss->scaler, dcss_plane->ch_num, - state->fb->format, src_w, src_h, + state->fb->format, + is_rotation_90_or_270 ? src_h : src_w, + is_rotation_90_or_270 ? src_w : src_h, dst_w, dst_h, drm_mode_vrefresh(&crtc_state->mode)); From patchwork Thu Nov 5 14:01:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 11884481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 431C0C4742C for ; Thu, 5 Nov 2020 14:03:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B97522074B for ; Thu, 5 Nov 2020 14:03:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KJ8FWFPH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="MH/mMdIH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B97522074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y3urRQ0mspIwn5jq2vV5V+QDzc2pGj/H+gcCZ1rJyGI=; b=KJ8FWFPHk3V+/0fX5wIiTmhJN W83GV/kS/GiHJbOPILW163SXqVkMbkBhhp51MmCIFnxh8XCz7MjaeggN4mzS0SrVmT2VHcLbvgrZd PHfO39Urqcv/gcxxfRCyLVf9krkEG/xc3Y1q1QTT9Hhs5SHVTGTbi5CTZE7Cg69+trcPTGoBnzs72 FgPARS1b2XenFzajQLoT3InkBeHV++bZ0d4gmoMd5kh58I9wP09nVOjXLs9HKYgqtqoRpx9C/rl/E BYAIzAAAWlQI/YRgQsqKW0RuOv+1u7P98InDR1RNqZQDtKpfZrw2cQhidckds4t8FiOaPvjcepqw1 KVBSZUrTQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kafqL-0005gg-L7; Thu, 05 Nov 2020 14:02:25 +0000 Received: from mail-eopbgr50076.outbound.protection.outlook.com ([40.107.5.76] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kafqH-0005eN-1z for linux-arm-kernel@lists.infradead.org; Thu, 05 Nov 2020 14:02:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oFIg0GUWLaLygJEKNo0QBDRZ7NiESa2AZOIfAB9f8IWl/vEFkyXk/oMlkrYAOP62sOMjH7E7OQ5b3WrMaRg7hsGrYVE9Pncsga17n2AhYw8mmiONqsGEJp9KN9kW09Vg8/YEIhwpiKLC21iwwh+tWDlt1AQN7XfnrvKPDFBn2BSAtSKdi3/L0lPzvzi2qfTNY1HmfwmPPMaO3wPY6GdCNo4taXiMKDre+fCKp6CCKHfVbdQBP5du3cDWR8DiFy4JcYbgubMIfzxZ5fNYu50HNQ4kPzXLlZEHac0i0HRIU486oXJ1iaogNK+JH29pImRZOvGt7cxALaXKEnyQBS/2lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mAmyNI4QT7uJstUZxrDUoJ7xltyM+XdeFVzSm0CHJSU=; b=f3az9R+UhK0dH4rMj+fkVofqG6avjIi3BaTS5PRboi9Z/Gcozhg+Qfc+GJZScCOaBYioYjNJpnbjGvEcThGi8btRyFAEdemrS1DyDZG1++67vWM0inP5v7zG8Tm2/ZR8Gq2tt6xrfn2t9tM8673tKfeD9grjvyxsa5GtQNm4zzYFMHg0SjGoTJ7u1cRNMNCVoge16Xd5AEz0Jy/eJhWL+gCaKyPw4zRjOg89NPXPrgp4oi0DKkp9xYMdVRXrGofzBCXvhUW3BMiBOjyUfCK8Ms8GjP2s5e8ygwZBMWD16ETpdr5fKUNaWq0igWA/0RDwiawGGV2qdNsqe4tnRxMCbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mAmyNI4QT7uJstUZxrDUoJ7xltyM+XdeFVzSm0CHJSU=; b=MH/mMdIHkXCND3GrMjjaav/oiJdPGdoO3BrLoX0K1ll46VomNV96Wrn2K7d2y/O8+C79AL+Bg6OI9XsOr1rQdlsLFxzPdTYSeWIRl0mHlyFzgnlpFZdqgf+z4rmtvRTgDXe3nKxhxigHqMkxB4WWlV6IJrd3YeVeiSTJ5oSPbic= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) by VI1PR04MB6783.eurprd04.prod.outlook.com (2603:10a6:803:130::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Thu, 5 Nov 2020 14:02:17 +0000 Received: from VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::f000:d709:509:bb5]) by VI1PR0402MB3902.eurprd04.prod.outlook.com ([fe80::f000:d709:509:bb5%3]) with mapi id 15.20.3499.032; Thu, 5 Nov 2020 14:02:17 +0000 From: Laurentiu Palcu To: Lucas Stach , Philipp Zabel , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , =?utf-8?q?Guido_G=C3=BCnther?= Subject: [PATCH 2/2] drm/imx/dcss: fix coccinelle warning Date: Thu, 5 Nov 2020 16:01:26 +0200 Message-Id: <20201105140127.25249-3-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201105140127.25249-1-laurentiu.palcu@oss.nxp.com> References: <20201105140127.25249-1-laurentiu.palcu@oss.nxp.com> X-Originating-IP: [83.217.231.2] X-ClientProxiedBy: AM3PR07CA0084.eurprd07.prod.outlook.com (2603:10a6:207:6::18) To VI1PR0402MB3902.eurprd04.prod.outlook.com (2603:10a6:803:22::27) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-141.ea.freescale.net (83.217.231.2) by AM3PR07CA0084.eurprd07.prod.outlook.com (2603:10a6:207:6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.15 via Frontend Transport; Thu, 5 Nov 2020 14:02:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f8617b05-f2ea-4bdf-560b-08d8819367c2 X-MS-TrafficTypeDiagnostic: VI1PR04MB6783: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FXwSLeSCHiwf/PmRSvj78Z9oF4d6IcOnvviwED0F7jR5jf0gjXA6QB8giUA+NjNXyfVPlQOGX7PfOw8TiqfJoIkqrfM4Zfnocp7QN8NO2HQgOLXzKnLZQ/Ufbsya3y5M2c6vJMvIEjhvT+aWIwcboL/fIuGRCIeOB0FQNt9XrZfal6/r4uwYTpaNDwpWBc1fbPlV/iR6rgnSls5pJnQeNZjNu8sCJtz0e7i0Rpo7cc9RW0Brfbin6SZDLuSy7VaazDu19Isi8To6sEFw82yG2bvP3L1iZNTgMd/BoKHf6ckYD8JcGXgMgjgQmQiNOgu4bgz0Bd7bLi2VEdFZSdg6zFJaDF+yaEh7D5bXSsPMVAQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0402MB3902.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(376002)(136003)(346002)(8676002)(2616005)(956004)(6512007)(44832011)(83380400001)(6666004)(8936002)(66946007)(2906002)(6486002)(66476007)(66556008)(7416002)(316002)(4326008)(52116002)(86362001)(478600001)(5660300002)(1076003)(6506007)(186003)(26005)(16526019)(110136005)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: xO8s8Sa3T9/kfwUGM2KBTzJu1q9ZWeQV5LIWCHlkg3gZ3JeaDyl495uqd6jqJW6+MRNEbhmLqHc+g8njeQoZtnQvlS/mv3PEUDQfS6a4OupLRVJJSFZF6FeVWvQtsqDFjLEJBJ0sZ+8u/hLQ4WvwzcSWaqTJRVeNDLkkFy+cpWdGuPvDS23XjPfdcto6SSf07UDnpDxG7t2hIaG1gV71n8iUaKPvumy+aRzMoM81rGHLt/vhbiVj2dIzOS/YTaXY4d335Ik7N/H++tckAFjMYDnXtbXJSrmvp3I7zd5Xif5URbCkXfD0CZZmz/ZLOZisYRtVW4MjoF5cgIghlZQ6CIzJnMw7crmK7yIzXBaxkeVRVkPUvCAJLqY0mlNkPZU2gLZxO8XgxeWkl7xtWXQcWWdB6BxaqgY1luX4i6amb6410GyxKh/gcBKmsdGA+vJBy3yLqYgBvjyuK8JYEM1fmPbVQI+eh+XauIKs5E/i7bLBQu8+rB+1Ewy63cFQyGHYK/K0cVu4sfNtf6i78Ye94PgdRT4l/VJvisCXrwuxy6iCbatfWxIrdv35w59vEKZH7FhDLZH3h/nRjA/VZsLkN6HVCT8YAPdlq8z20Nu2jpDyWIMEgPxDXy1RN+WDrJgbBEZGKLfByzhPQ+QqGKb+8g== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8617b05-f2ea-4bdf-560b-08d8819367c2 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3902.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2020 14:02:17.8601 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bfGH1yZ0Zrp65aHDWCaubYSUhxTJoAKkfbQyV1l5hFq7MIbG0J22TggDt+E/v003ihULR66qpTa114quac80cA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6783 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201105_090221_184086_4BB3BB07 X-CRM114-Status: GOOD ( 15.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurentiu Palcu , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This small patch fixes a warning that I got while running coccinelle: CHECK drivers/gpu/drm/imx/dcss/dcss-plane.c drivers/gpu/drm/imx/dcss/dcss-plane.c:107:21-23: WARNING !A || A && B is equivalent to !A || B Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Laurentiu Palcu --- drivers/gpu/drm/imx/dcss/dcss-plane.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-plane.c b/drivers/gpu/drm/imx/dcss/dcss-plane.c index 46a188dd02ad..5db093aada2f 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-plane.c +++ b/drivers/gpu/drm/imx/dcss/dcss-plane.c @@ -103,8 +103,7 @@ static bool dcss_plane_can_rotate(const struct drm_format_info *format, bool mod_present, u64 modifier, unsigned int rotation) { - bool linear_format = !mod_present || - (mod_present && modifier == DRM_FORMAT_MOD_LINEAR); + bool linear_format = !mod_present || modifier == DRM_FORMAT_MOD_LINEAR; u32 supported_rotation = DRM_MODE_ROTATE_0; if (!format->is_yuv && linear_format)