From patchwork Mon Jul 16 09:56:13 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: 10526349 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 A8AC9601D2 for ; Mon, 16 Jul 2018 09:56:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3726289EB for ; Mon, 16 Jul 2018 09:56:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95F0C289F9; Mon, 16 Jul 2018 09:56:44 +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 4A93E289EB for ; Mon, 16 Jul 2018 09:56:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E1A96E43B; Mon, 16 Jul 2018 09:56:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0c::60a]) by gabe.freedesktop.org (Postfix) with ESMTPS id EB9B16E43B for ; Mon, 16 Jul 2018 09:56:40 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.96.140) by VI1PR0802MB2559.eurprd08.prod.outlook.com (2603:10a6:800:ae::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.19; Mon, 16 Jul 2018 09:56:36 +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 v3] drm: mali-dp: Set encoder possible_clones Date: Mon, 16 Jul 2018 10:56:13 +0100 Message-Id: <1531734973-8804-1-git-send-email-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20180713161407.GQ20303@art_vandelay> References: <20180713161407.GQ20303@art_vandelay> MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: DB3PR0202CA0009.eurprd02.prod.outlook.com (2603:10a6:8:1::22) To VI1PR0802MB2559.eurprd08.prod.outlook.com (2603:10a6:800:ae::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 558c5985-2c0d-4dd1-c8bb-08d5eb026be1 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:VI1PR0802MB2559; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2559; 3:P5NiQyaAU+bxM/4kxjReh2yx7ioI0aNISRgWeU0CP5dlAWAR9zzxTNRaOx8uRsvG2Fc/IBy4XEKcJjvLQLI57uW9hXic+x2J6UqhfvP0ue6naCIpUiZD1EywgjB5wjDgtr9pj9H/yOjRSwbqs5a0xqC0CnSqHjkctFws/s7SvZF3IBea14XA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Bdc3kJLsIQ58D/TNubaqD87Be3wooK48UuKnv/zSyJZ3eB7Vx57WR+AGKWB8OpV1hHgJvKOFi+fVvWSelcKKz+ZRq1+oCaZugyAMi6zd0n412ZLazij54f6Vn1BNkPrg7wBAlIHOjRyK2zJsQBtoUPQyY4/TR+22i7XifEYutD/bQ3p 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)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1PR0802MB2559; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0802MB2559; X-Forefront-PRVS: 073515755F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(136003)(366004)(39860400002)(396003)(346002)(376002)(199004)(189003)(8676002)(8936002)(36756003)(106356001)(105586002)(478600001)(26005)(48376002)(6116002)(81156014)(6666003)(5660300001)(316002)(2906002)(72206003)(50466002)(81166006)(68736007)(86362001)(25786009)(16586007)(7736002)(186003)(16526019)(52116002)(66066001)(53936002)(97736004)(7696005)(486006)(51416003)(305945005)(4326008)(47776003)(386003)(446003)(2616005)(6486002)(11346002)(956004)(3846002)(76176011)(476003)(50226002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0802MB2559; 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; VI1PR0802MB2559; 23:SdhqC+phcyGLynGE4yThT7IycFCUighl2zqo7z3?= =?us-ascii?Q?2XEbmQ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bywRYDsD?= =?us-ascii?Q?r4RWbdG33z5aq0LWUG/spUa4klyka9aRoiuhntu8VzH/ZjHn2Fi/xnb1/AnX?= =?us-ascii?Q?BCRLY7xBKZcbqYv31p5prRxD1wuhYLGTtlckpifowe7V8OBUrpNmOwSnzFu7?= =?us-ascii?Q?WPOVZk6B9H9ZNPUc+/ojFey/g9sAQfoPMKPB2Js9f8kqMir8avJae999U/si?= =?us-ascii?Q?WkpxA9Zdoyl1a3LWUaZuJRtq4yi0E+zYP2jrXsm5f1YqtJ+mZUWWBzZqt2oD?= =?us-ascii?Q?ShqDhcCQUhiUX3wI=3D?= X-Microsoft-Antispam-Message-Info: ghqlwkEQl7i93cTz23b3vhM9OrPOn6qnpNtcrz3UuO3gr4NOAD2Li3P+bDUiBauOB7w1R8rwKF/AkP0eIPsUnbzaTlCW0jv213dkWmdhyKAPagQBdw1KJXI28hL31yFMchtWTLSw/AQmJAQ+32NzffjQ9RtGR/zgj/3wThs1kK4FNn25xoSnOjJnVoEJqQkdKOFgOqZWC8865FgdtfUPDy9+2Y1JBmgHEXNkYqUTQWB6Vv+GbEFfke87Fo++T027xwgmHmcTpnkUlZIULRic9UpVnSTCintDVTHIWFlT/MayRrcPUPPgsTfO/urXhMU3l51cvsEX3w2OOl5f8thDhdQfh+aMcxS1rmzQD2ws5dw= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2559; 6:ojGmCVUpaBIpDvChrOc3zBv7Q2T/j6JlprtCt8miTfMEeZIkyBYXtYEatNY1uzQSdfTc42/gg0mnJYODZU886gOlNIyufc0tP4OMSsx6FfbLDApUtKoc2P3ZCF4lbZEF2LHWgCApStLsZsnQtdGKkai0EXH2SXPcUe6n6E3M0jh2oHTQmGBoKVuvTN5vXwHRJgW4zph+IbVe1eqZ8iVOicPTEpNIDcqZYqSo7Z5VSHZ5l140Y5isOANDzkYtQiP7BHh0htNSo4IM7T9Memdw7b3Vz8vRuIbk1wTY+rmIkCozOiY0/rBN/qcr1jk7FbyonwlhBxFF9tY2MQycYISQToG64PWlvaJiKGMx3O93mZCFvp2WE3PpoB/JwpSOwuuAxkOH3+3w4aUuPsj11uCcIGi9OzaZ3QM+lDTlDXQhETr0CVIU6ZMAqSUrhp/urTcTMvclpSJT80rBjlx7+Y50Zw==; 5:X3AAhweY1A/BkI8srCCmBnNkDcRkUsUymNci80FmFOFwirZDQBQvJaqF1QZU39KLbsgRP6tp74eJC/41iurxV9Z00HsZQOZUzOoP0edx8P7LhwaTIDME5dLI4EL3TDXaINtW/wEo51hoEsi3Q2+TbtThUpr3d8Rm9ZUgfTuL4d0=; 24:/fD5zI7ugs4A2QD0Hfs0vEjWVy6KRdeXCsKDnXMLxKMHnCGA9NQH2jIo96q7RAd6CReFla0hwizrbLi45sa0tKyFT1yrGHXa3NUFPwHsD4M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0802MB2559; 7:gpamegBiXz5V+5yLqx1weBuGqQpwYs5UHVYHoL7Zgi1KDKvT0C249YHvemg23bFq5hOe9E81uB9cjtKMHiblUt6buWdPzznbngPdxsvwm1Gpcmd0c6zIsvuuLfrZET3bumuSbzuWvCMHRnQocOi4nu7jb+I3KnWPcG9Ub0tN1vxdXr05mubgg8R1wGxvyZDHjWFjRuW9saAx4JhuwIoGhfocjKQgFijR10xx28u+ta4aLWE8014kKu1GDqbQkF9Q X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2018 09:56:36.8268 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 558c5985-2c0d-4dd1-c8bb-08d5eb026be1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2559 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 Changes since v2: - Use proper style for multi-line comments. Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/malidp_drv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 5b72605..4169a72 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,16 @@ 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;