Message ID | 1451963484-35611-1-git-send-email-meng.yi@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 341BF9F3F6 for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 5 Jan 2016 13:24:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6159B20389 for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 5 Jan 2016 13:24:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5381D20380 for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 5 Jan 2016 13:24:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 992C78A0F4; Tue, 5 Jan 2016 05:24:07 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 3624 seconds by postgrey-1.34 at gabe; Mon, 04 Jan 2016 20:54:10 PST Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0087.outbound.protection.outlook.com [157.56.110.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id 921496E50F for <dri-devel@lists.freedesktop.org>; Mon, 4 Jan 2016 20:54:09 -0800 (PST) Received: from BLUPR0301CA0036.namprd03.prod.outlook.com (10.162.113.174) by BY2PR0301MB2118.namprd03.prod.outlook.com (10.163.197.147) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 5 Jan 2016 03:19:54 +0000 Received: from BL2FFO11OLC007.protection.gbl (2a01:111:f400:7c09::113) by BLUPR0301CA0036.outlook.office365.com (2a01:111:e400:5259::46) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Tue, 5 Jan 2016 03:19:54 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11OLC007.mail.protection.outlook.com (10.173.160.142) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Tue, 5 Jan 2016 03:19:51 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u053JiJ8021470; Mon, 4 Jan 2016 20:19:45 -0700 From: Meng Yi <meng.yi@nxp.com> To: <airlied@linux.ie> Subject: [PATCH] Fix no fb check Date: Tue, 5 Jan 2016 11:11:24 +0800 Message-ID: <1451963484-35611-1-git-send-email-meng.yi@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130964375945214241; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC007; 1:pzH7uptUaSzyX5ezCtnkRTP/XURbIQkqQT8MGYoemCFA/AEK7rdoVUnyzZcPSaVZ1E6IjuW8g3W4mSmy0OgTQ9PDzSWbnQCKJaNAUORtDgkq1xoXgfi28CEbkevDoCOdP3jXZ+7qHVqqiGpYn8g+jlA3pF4NgMPReNy3MZDT1/gPU7Llfm0eFB667SRh7AaHe0l93sPKltuhoTajhewpMkoDNM9pv14hUXYiAMh5WRp8t2P/qvxc/lf6llbUAjD9Lrs0Rwz1g4hRjlLpRIY8PzLKiWZ+Cy638QJUwp4Mu4anDTPozOk1+a1zH2++ij5lPqnPevWh3Zb7s6Fugb9hzKH48WjXDf6JsFDsFYyX+LRC7QiuQj56++gyAmBEKRbS87qL7VkLADEe8seIjnGYbGKJpbyfgQj2PGlLAme0VL2/HXTLh0eOomuoj0Zy2Lar X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(47776003)(6806005)(105606002)(48376002)(36756003)(2351001)(1220700001)(5003940100001)(81156007)(50986999)(5008740100001)(19580405001)(19580395003)(104016004)(85426001)(110136002)(189998001)(97736004)(50466002)(5001960100002)(86362001)(92566002)(1096002)(11100500001)(50226001)(586003)(33646002)(77096005)(229853001)(4326007)(106466001)(87936001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB2118; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB2118; 2:x6p7yEWi5B0Qbbw7ZAeKIrIhdcAAndnzkMXBcIQxPML4gDHcXsZBAwRDiS65/gw0utlAXX/IDWwSMUq89fTwslq6+eZZe9HKJX2B2K1Cc7HO/kH3enRExbGAVLApezezmqjVB5GA3GJgA4NCujP9eg==; 3:8H7o/6PuP4zqvvnDSAyv6L88kwj0xLInaaK7W25XmvPkKqaGjak37zEri0aTdE6CB5hjuTLnAYkBYRTGDyr+dIMWNTS8slhtQIx0+Q1OSYpDQBb9wu/ZMhv+2rrIjWOMfhZOiO2+W27Ynwa1xIp0TPW3s4J9YZ56LBiQxKAfB1xDY9zrLDfmp3zH9pQtVHt/HuZHWeCCKrmIASA+HGYf1OzKoj3XYmIBNc6ZcOwpm88=; 25:9wVhX/7H1IZvx757Az8KYyjn8QKx6f4Xtw8oZ5hfM2zg2MiZ2BqP06GWsz71EPs4z1VufBiCoW2K1UYr+swi1hksN+1kBC5DtW1eVo6puMLRyfj8W/FyRGm/5L1sZ11UEkbeMqT3DHENv/SicjsRWcjI6wddTfIfUKxBxIE64fWd8RMzcHSl0x9FV8JGU8fNCLxZwBcDFCHXcFl9BoxnhNcOgYiR4+tQx8dru75ovyTFlxNflSvqsTNmIQrZ7wYV7C+rNybEO8xUY/pndk3oKA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB2118; X-Microsoft-Antispam-PRVS: <BY2PR0301MB21183C26A27AB63DF46E6430ECF30@BY2PR0301MB2118.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001); SRVR:BY2PR0301MB2118; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB2118; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB2118; 4:mkn7d2ec75ShRT52tRmDdTHtL+YIStBZZrABRtUtWy3noX3f0ymRREhed3gkaphP/o3YX4CZSBL7lMYIeDLCzBPzk2HgffF67vLaVPJDRotqN+slvT3dzIWErOybtRSWgP0WlFIv8pGDbruvkIYkKN+pP57v69hJHOJaV+CQUkM6Tgz6pGJiDWGmPjrWT3is6QfW/M+KzDaMHhw4665n8N7JB2y8v4pOyKl2/TJ5tME95pb/YpAYEVB1+mhkA9qv5o1MS13Mr6XvVBpxjEdfQjYz450uWzFS25fO4X3/sYt1k8QwYp2Hf3wDHe6z84LLwdNMeFIYXVy5brg/AadA1Z7ph1MpSSsxcGrjnpTY1/qtQLfEMrC3j+HzJ49Tz3tr0Fbu1pYaUMMMvvbpBWPY7D1OiPhXzoBMo+V2VxCCMviGuuwuJoheelJTBbtKAPoJ X-Forefront-PRVS: 0812095267 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB2118; 23:Xcr3yPjCNGdczhtCCxxEkaXDHaAJt8FYbM3zBbd?= =?us-ascii?Q?1B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dbzXLtUiehU3+o7+b?= =?us-ascii?Q?LTbEeoAwH9kfMUIGsAMRPlQSkNUB35hC9eDW2CvMN7X0Gtfd3E8nR37uA4ZB?= =?us-ascii?Q?zoUyzUf6Eve1m4MoYzSGgW3HM23aWybKNrXtf37lqCyreSx/OirQFzH3Zqq1?= =?us-ascii?Q?sX6b/xZw=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB2118; 5:Movr9oTTpImW+NGDEz/zVDDaSR40/174pVoouxthbzL4GYGRIuaaf4ltD7wwTXXnVxpUy3AEx4Jwr3aqVHpv6J7NWyyKQ4S6GFWQUambP3zVcqDXfi79PUQlwxEibm0ALgcHZfZPFy9nC6NhfdfvAyPwcJsBpqVgNlVQjq/Zfuc=; 24:qSoQYH4z7c9UlBD39/iA/VCe4w19KP88NGSOapDmqtJhqitFojqDZ8hEVHcDDZpvT+sAlnWRDAxdw+PoGFqwt91ojomilgPdU68j8R+h9aQ= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2016 03:19:51.8694 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB2118 X-Mailman-Approved-At: Tue, 05 Jan 2016 05:24:06 -0800 Cc: Meng Yi <meng.yi@nxp.com>, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <http://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <http://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <http://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c index 4b13cf9..8965580 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c @@ -41,6 +41,9 @@ static int fsl_dcu_drm_plane_atomic_check(struct drm_plane *plane, { struct drm_framebuffer *fb = state->fb; + if (!state->fb || !state->crtc) + return 0; + switch (fb->pixel_format) { case DRM_FORMAT_RGB565: case DRM_FORMAT_RGB888: @@ -85,9 +88,6 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane, unsigned int alpha, bpp; int index, ret; - if (!fb) - return; - index = fsl_dcu_drm_plane_index(plane); if (index < 0) return;
For state->fb may be NULL in fsl_dcu_drm_plane_atomic_check function, if so, return 0. No need check in fsl_dcu_drm_plane_atomic_update anymore. Signed-off-by: Meng Yi <meng.yi@nxp.com> --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)