From patchwork Fri Jul 13 15:11:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru-Cosmin Gheorghe X-Patchwork-Id: 10523567 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AB83602A0 for ; Fri, 13 Jul 2018 15:13:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A17C29D3E for ; Fri, 13 Jul 2018 15:13:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E6D129D41; Fri, 13 Jul 2018 15:13:16 +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=BAD_ENC_HEADER,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 1972829D3E for ; Fri, 13 Jul 2018 15:13:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D5C46F2A0; Fri, 13 Jul 2018 15:13:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40056.outbound.protection.outlook.com [40.107.4.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6DECD6F2A0 for ; Fri, 13 Jul 2018 15:13:13 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.96.140) by HE1PR0802MB2556.eurprd08.prod.outlook.com (2603:10a6:3:e1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Fri, 13 Jul 2018 15:13:10 +0000 From: Alexandru Gheorghe To: seanpaul@chromium.org, airlied@linux.ie, dri-devel@lists.freedesktop.org, liviu.dudau@arm.com, brian.starkey@arm.com, malidp@foss.arm.com, ville.syrjala@linux.intel.com, daniel@ffwll.ch, gustavo@padovan.org, maarten.lankhorst@linux.intel.com Subject: [PATCH v2 3/3] drm: mali-dp: Set encoder possible_clones Date: Fri, 13 Jul 2018 16:11:00 +0100 Message-Id: <1531494660-28668-3-git-send-email-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531494660-28668-1-git-send-email-alexandru-cosmin.gheorghe@arm.com> References: <1531494660-28668-1-git-send-email-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: LNXP265CA0014.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::26) To HE1PR0802MB2556.eurprd08.prod.outlook.com (2603:10a6:3:e1::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 097c15b9-5a22-4a91-efbf-08d5e8d3258e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR0802MB2556; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2556; 3:0P/YnDQfGf5sNSLNzXTIa0hFJSPqy5P0wFyxuZQQsRg5WR3WN94ogwtb3vp7VPfCfiOkAEwF3PJChlYXkkapgeSukXbQwVzQO4M6UxTK2OrSFE+rI4/ECa9xFDTBX0KOMEiTWioR3j5P2un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xqOIL4NNsDSuHksRYqFrBBOq1w2VNrgZ70zQ1Daa+mboGHvAmQSgor2bzT2d9a8BE8UPa9D+abkeGxQfl+XYTDlbNMsDLBvnEeO/5n9BmsOM1u7P/MSIUEzSNwoIt+trEUwyJqJ4q9J3kQC3F/SN3XN/0kGs+djiG+kPj2KPR9buSn5ZUOdvSbJUMoiji0lxWzc2r3pvCYEI6SiTPI+ZG9ko X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:HE1PR0802MB2556; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0802MB2556; X-Forefront-PRVS: 07326CFBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39860400002)(376002)(136003)(396003)(199004)(189003)(5660300001)(36756003)(16526019)(25786009)(105586002)(3846002)(97736004)(6486002)(66066001)(8936002)(8676002)(86362001)(81166006)(4326008)(316002)(6116002)(81156014)(16586007)(26005)(11346002)(68736007)(72206003)(386003)(51416003)(6666003)(50226002)(53936002)(478600001)(7736002)(47776003)(446003)(50466002)(486006)(2616005)(76176011)(106356001)(305945005)(48376002)(186003)(956004)(2906002)(52116002)(7696005)(476003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0802MB2556; H:e114479-lin.cambridge.arm.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2556; 23:W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vC8ifFsA7aTh4NtQ08Xwd4jvU/w1nvmmK3WQ3IJr9gsRQMNDa+bOjXrIqUFiVsPYdXRCnG03yQ43y5P4z5M5dU/xXVTKBJO/jU3uSTQPYv1QArecQx5Wj6B2nsZ/N30mktQyfsKPHZXAVi+3iGvu5lFflmGqaSuOx5VgLrMJqdVu+mkPLIAy9craZzezhHgu3uOtq5Nqi1+7zL2Ji6ZFYgDB9plfpQG3Z3fInkw7Y2alhdbA==; 5:vDm4/3SYT0cEaqfmiCOvX3+PNyjFm/IdO+RALdDixhx2a4nJGbL0bYS4gHoxx2gaOqFx38Tjrxnf5AqY4PMRhGl1Cwzn7K66G3AmzdmMT0T52qdqiZ7bEcLymr6C/VJawohcqeJTpy6+ZNjb0lJ27NLJYZ3CmrQ3+7TR6Vs7/YE=; 24:WSSUMppFTpdK/OKOrekExCBjy2Zm56wtpAAGPZjeBivcPmYSyA9p3lcJC28Cw0cqr2O/d07g4Ja6MpMC2q8ystw8a2zr/WPhE/rc7e7zKCI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2556; 7:6ogQvfrJ5lYfRhhaeAQF3k/ItNbfA8yR7lH1oTBkx8Ag/T3ZUXitwPzkZcy7AAogbREP4ZjVxCXc7QLcC5yDthruY6iLElukiWx8S43fOEQKqd8WzVtUiWP5eedFYx3k+SY1o+h0ihAiPEHhoKMoBVg4KB1OQ49X5Hs8jcZgnTVfL4Kp3wIeuSXK3LCYZxDGNvCwxXA54qGNfumuyEkP9z5Qf7p6jfj/sGb+ltOg8htOeoZ+UHevMdE1VlwBng3W X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2018 15:13:10.2015 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 097c15b9-5a22-4a91-efbf-08d5e8d3258e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2556 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: nd@arm.com, Alexandru Gheorghe Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Set possible_clones field to report that the writeback connector and the one driving the display could be enabled at the same time. Signed-off-by: Alexandru Gheorghe Reviewed-by: Harry Wentland --- drivers/gpu/drm/arm/malidp_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 5b72605..08b5bb2 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -616,6 +616,7 @@ static int malidp_bind(struct device *dev) struct malidp_hw_device *hwdev; struct platform_device *pdev = to_platform_device(dev); struct of_device_id const *dev_id; + struct drm_encoder *encoder; /* number of lines for the R, G and B output */ u8 output_width[MAX_OUTPUT_CHANNELS]; int ret = 0, i; @@ -737,6 +738,15 @@ static int malidp_bind(struct device *dev) goto bind_fail; } + /* We expect to have a maximum of two encoders one for the actual + * display and a virtual one for the writeback connector + */ + WARN_ON(drm->mode_config.num_encoder > 2); + list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) { + encoder->possible_clones = + (1 << drm->mode_config.num_encoder) - 1; + } + ret = malidp_irq_init(pdev); if (ret < 0) goto irq_init_fail;