From patchwork Fri Jul 26 08:13:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lowry Li (Arm Technology China)" X-Patchwork-Id: 11060459 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 744AC912 for ; Fri, 26 Jul 2019 08:13:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6522F28A0F for ; Fri, 26 Jul 2019 08:13:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57B7A28A3E; Fri, 26 Jul 2019 08:13:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E2B2F28A0F for ; Fri, 26 Jul 2019 08:13:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E4926E89F; Fri, 26 Jul 2019 08:13:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140081.outbound.protection.outlook.com [40.107.14.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D9536E89F for ; Fri, 26 Jul 2019 08:13:18 +0000 (UTC) Received: from VI1PR08CA0094.eurprd08.prod.outlook.com (2603:10a6:800:d3::20) by AM5PR0802MB2594.eurprd08.prod.outlook.com (2603:10a6:203:99::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Fri, 26 Jul 2019 08:13:15 +0000 Received: from VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::200) by VI1PR08CA0094.outlook.office365.com (2603:10a6:800:d3::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2115.14 via Frontend Transport; Fri, 26 Jul 2019 08:13:15 +0000 Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT009.mail.protection.outlook.com (10.152.18.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Fri, 26 Jul 2019 08:13:13 +0000 Received: ("Tessian outbound 1e6e633a5b56:v26"); Fri, 26 Jul 2019 08:13:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4ee8ac99b27cfc05 X-CR-MTA-TID: 64aa7808 Received: from 80f38c3bcd16.1 (ip-172-16-0-2.eu-west-1.compute.internal [104.47.12.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0FEB74C8-7CCA-4665-83DD-D8C3D92E91BB.1; Fri, 26 Jul 2019 08:13:04 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2053.outbound.protection.outlook.com [104.47.12.53]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 80f38c3bcd16.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 26 Jul 2019 08:13:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kkoU2Q7ex90ktMFBYpm9mjFnSk58voEPAsJCiuFi3I2y6vcsLy5wpJhsHkWyTvTwBkxWjayhLtoTADM3bzLKLoI4j+P7tkppF03aQknMx8c/Dg0zG8aYK6/1aknC9ivcNzwJYx+o9KFMKcrKtgOdBMQDSi17ichyMx7FRQqrN6o6+ldPpips4H8ok3QTAo+LSUGrrKITRQ7druTkarP9wqTwe7QmHhljsMUqUQtxszfceO+amyMUX8Fz06bRDDUhU/+OvXRpnSPnhOKWlHBFRXIBkG3x9qjhsGE9eXWGCxdMw3/iOpK6XKVV89ZKpOILnr6sLuYEP+lQjongUPsgqw== 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=pgY8oeibiBD6WrixfYc+P2BmrPVYxKZ9bPd3a85T118=; b=C+7rf14WSksmPakiN8i6hrh4hPIuKXyFjCnkG7GaIK2pPwJBMSCMqRW5v523N45Zwo25JCayoFiTqnHRVjCWIYEUVAVbItq3RTT3e4pbcl+p2oWOuRMtURhbEwRqojwJG7GjmkF1o/21wsB5qcf11m6OAZ/VKK55dtSm/VLq2L3ctBT1f3KL2+h7WnY28jrdyPT2M1p8S58YboAWs0AILBhUrzAol7kck+KgDUXxg1wA49o+1YPFZyyXxjSc98jhTQEJXyw7kaaCY0e23kWTxd9CqCMLqktHuXRgQP4HBfgOyW0AElY7/Q9pYdb8Hwe2lsbaMI4Vd1yyhBS743h0Zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none Received: from VI1PR08MB5488.eurprd08.prod.outlook.com (52.133.246.150) by VI1PR08MB3806.eurprd08.prod.outlook.com (20.178.14.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.17; Fri, 26 Jul 2019 08:13:01 +0000 Received: from VI1PR08MB5488.eurprd08.prod.outlook.com ([fe80::c091:c28c:bb1a:5236]) by VI1PR08MB5488.eurprd08.prod.outlook.com ([fe80::c091:c28c:bb1a:5236%2]) with mapi id 15.20.2115.005; Fri, 26 Jul 2019 08:13:01 +0000 From: "Lowry Li (Arm Technology China)" To: Liviu Dudau , "james qian wang (Arm Technology China)" , "maarten.lankhorst@linux.intel.com" , "seanpaul@chromium.org" , "airlied@linux.ie" , Brian Starkey Subject: [PATCH] drm/komeda: Skips the invalid writeback job Thread-Topic: [PATCH] drm/komeda: Skips the invalid writeback job Thread-Index: AQHVQ4nw7K9FV7USuUuF4ik2yHSO+g== Date: Fri, 26 Jul 2019 08:13:00 +0000 Message-ID: <1564128758-23553-1-git-send-email-lowry.li@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [113.29.88.7] x-clientproxiedby: HK0PR03CA0039.apcprd03.prod.outlook.com (2603:1096:203:2f::27) To VI1PR08MB5488.eurprd08.prod.outlook.com (2603:10a6:803:137::22) Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Lowry.Li@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.9.1 x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: eeb6c3be-5aed-4d2e-c5f2-08d711a11af5 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam-Untrusted: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:VI1PR08MB3806; X-MS-TrafficTypeDiagnostic: VI1PR08MB3806:|AM5PR0802MB2594: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:972;OLM:972; x-forefront-prvs: 01106E96F6 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(346002)(396003)(366004)(376002)(189003)(199004)(66946007)(478600001)(2201001)(4326008)(26005)(2501003)(36756003)(25786009)(66476007)(186003)(53936002)(5660300002)(386003)(6486002)(2906002)(55236004)(64756008)(66446008)(6506007)(8936002)(66556008)(102836004)(6636002)(99286004)(68736007)(81166006)(110136005)(66066001)(71200400001)(486006)(8676002)(71190400001)(14454004)(54906003)(50226002)(7736002)(2616005)(6512007)(6116002)(316002)(6436002)(256004)(3846002)(305945005)(14444005)(86362001)(476003)(81156014)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3806; H:VI1PR08MB5488.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: cMjaXxZo/5zeBnMzoPoPivur9Ki73FfV08C64Uq8iiQoA1Y1WKvStXnIkHZzeEW65km3ySEFLYBNxcu73DbavRrlj3FJdmMxiJnRSo5KOlpEvhxV4SRriOQxCqn8Q5QP2seYzLCfFjuNAT9kN/TuNGzbewUo3z5fjNSEIYG5UZdW2QQP62aLzvkukE8dZtQfN8ftLW7Ff0kefjru3py6i8B0HKg5rfMQme7Hpnl7GtwI55Vlmm1FhCh5oXQzeyjdm7BLmR6XUlU6JMXZByL75hODIFCIP+1bzKfFnOVg1VOJeRk4/1pjVJdunKqzOBw5OFktKWQBUn7YZ0vbb7JWzK+SLiWPIySCRDKFv+MsPhzJ7WlNeQ6xa3SdcUmJmI+MEvE85FcRJRMwH0mm2rqeUYKMVkkOH1btqK+2yKhsYBE= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3806 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Lowry.Li@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT009.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(376002)(346002)(39860400002)(2980300002)(189003)(199004)(478600001)(386003)(26005)(186003)(2501003)(54906003)(6116002)(50466002)(63350400001)(3846002)(356004)(26826003)(102836004)(6506007)(6486002)(66066001)(36756003)(110136005)(99286004)(486006)(23756003)(47776003)(2201001)(6512007)(63370400001)(2616005)(476003)(7736002)(126002)(336012)(86362001)(50226002)(4326008)(6636002)(81166006)(81156014)(14444005)(70586007)(5660300002)(14454004)(25786009)(36906005)(2906002)(8746002)(8676002)(76130400001)(316002)(8936002)(70206006)(22756006)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2594; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:TempError; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; MX:1; A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 8fb0ef02-f817-402f-b68b-08d711a11335 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(710020)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:AM5PR0802MB2594; NoDisclaimer: True X-Forefront-PRVS: 01106E96F6 X-Microsoft-Antispam-Message-Info: 6tCfZf0hAzmc2QGcXh/dt249wLxg2rCNVISgK2UDy/VjiTrdrBwTEuASAfBqosRF4qTxJKF9O2myyVTHk+fJWwsgk03KtJDQu+Rqtr501tt8qVX5RBJi/sB2/AkSy5d+/XDHWt9Lf2/gEZZf3hei17atCmR3xA7zlELOggR3S2X/6Hp4s8jhbvas1jHuqyKgcbx4+bCpRfpQdYpzV+VJDMwW0yokREkPfh5OS8v9FyIvigEPbzetkSpYzbRpMLpMoEgGhQjNT47mdyr1E/hCbq6f/HY2Za85y7BBzoHcJSEEoSuGTuEBvlGYMBvwdriK+khrKyKk44ZuL9kJnaVkfMjjR0jyT9GjNT6x08POFyCyAHZpCfA+V88QTCSUWbgoiCpGV+MpWAkwoYHLW1RtmCvBOvfOFJRCdh8/q+gsJCo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2019 08:13:13.4354 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eeb6c3be-5aed-4d2e-c5f2-08d711a11af5 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2594 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pgY8oeibiBD6WrixfYc+P2BmrPVYxKZ9bPd3a85T118=; b=Acd9lTsJFx6lWgfhvUNwZBk19sMSBHglND4QOEq12VV+rIoDSHG7HHZl3k7uauuVjCvabSmgbQWxxL84G6fN9/3E5jFtkra/C7pfrYbwrqANu7Dwvw4RVklq3DR5pN5rRKWNMmrWkFqu0Nckdu+ZtYkj6Yv5Gm9/LeyQ9ZiRp8Y= X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pgY8oeibiBD6WrixfYc+P2BmrPVYxKZ9bPd3a85T118=; b=Acd9lTsJFx6lWgfhvUNwZBk19sMSBHglND4QOEq12VV+rIoDSHG7HHZl3k7uauuVjCvabSmgbQWxxL84G6fN9/3E5jFtkra/C7pfrYbwrqANu7Dwvw4RVklq3DR5pN5rRKWNMmrWkFqu0Nckdu+ZtYkj6Yv5Gm9/LeyQ9ZiRp8Y= X-Mailman-Original-Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.freedesktop.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.freedesktop.org; dmarc=temperror action=none header.from=arm.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ayan Halder , "Jonathan Chai \(Arm Technology China\)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin \(Arm Technology China\)" , nd Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Current DRM-CORE accepts the writeback_job with a empty fb, but that is an invalid job for HW, so need to skip it when commit it to HW. Signed-off-by: Lowry Li (Arm Technology China) --- drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 2 +- drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c index 2fed1f6..372e99a 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c @@ -265,7 +265,7 @@ void komeda_crtc_handle_event(struct komeda_crtc *kcrtc, komeda_pipeline_update(slave, old->state); conn_st = wb_conn ? wb_conn->base.base.state : NULL; - if (conn_st && conn_st->writeback_job) + if (conn_st && conn_st->writeback_job && conn_st->writeback_job->fb) drm_writeback_queue_job(&wb_conn->base, conn_st); /* step 2: notify the HW to kickoff the update */ diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c index 9787745..8e2ef63 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c @@ -52,9 +52,16 @@ struct komeda_data_flow_cfg dflow; int err; - if (!writeback_job || !writeback_job->fb) + if (!writeback_job) return 0; + if (!writeback_job->fb) { + if (writeback_job->out_fence) + DRM_DEBUG_ATOMIC("Out fence required on a invalid writeback job.\n"); + + return writeback_job->out_fence ? -EINVAL : 0; + } + if (!crtc_st->active) { DRM_DEBUG_ATOMIC("Cannot write the composition result out on a inactive CRTC.\n"); return -EINVAL;