From patchwork Thu Jul 12 08:48:56 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: 10521347 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 11091602C8 for ; Thu, 12 Jul 2018 08:49:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7B2C2952D for ; Thu, 12 Jul 2018 08:49:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB5692953D; Thu, 12 Jul 2018 08:49:11 +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 8D6312952D for ; Thu, 12 Jul 2018 08:49:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 936256EED9; Thu, 12 Jul 2018 08:49:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70072.outbound.protection.outlook.com [40.107.7.72]) by gabe.freedesktop.org (Postfix) with ESMTPS id C4FD06EED9 for ; Thu, 12 Jul 2018 08:49:08 +0000 (UTC) Received: from e114479-lin.cambridge.arm.com (217.140.96.140) by AM5PR0802MB2545.eurprd08.prod.outlook.com (2603:10a6:203:a0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.17; Thu, 12 Jul 2018 08:49:05 +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 Subject: [PATCH] drm: mali-dp: Set encoder possible_clones Date: Thu, 12 Jul 2018 09:48:56 +0100 Message-Id: <1531385336-17418-1-git-send-email-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: VI1PR0101CA0069.eurprd01.prod.exchangelabs.com (2603:10a6:800:1f::37) To AM5PR0802MB2545.eurprd08.prod.outlook.com (2603:10a6:203:a0::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dfb493b4-9117-4dcc-4502-08d5e7d45391 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:AM5PR0802MB2545; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2545; 3:1s15kbFjEKyy+ecemsBgVUaxexxAymDibbo1krSHBgfH1gJUgJL3Q3Ff4ni4Migybtzl4suoEblWRNNHp9gc1oM/EnKfn6UZJDaRkC74LLNjbXtJZ4iFGy6M+N+/4h7mTw4yOy8sfu4ZuwCKsGsgKgxo5mFXxovvreIeNz8HwYfP7VyKvb7KK6K/fsN4YferZ23i9nmbb8SSl9gxLaLmtL1Hc/jx4ik4JkYWYGu8hPLgYqPXmWtr+EPDrXlBBnFb; 25:UB+ifpP/KTKw4AJaS5FtEA5oMFEqheAaScQiHjulP20xYTfqScTNXq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LGjT6r5zfxRUHisr3HiSK5hFHLrR 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)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM5PR0802MB2545; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0802MB2545; X-Forefront-PRVS: 0731AA2DE6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(396003)(366004)(376002)(199004)(189003)(8936002)(86362001)(486006)(50226002)(5660300001)(72206003)(8676002)(97736004)(956004)(81166006)(2616005)(1857600001)(47776003)(81156014)(478600001)(53936002)(66066001)(4326008)(476003)(51416003)(386003)(305945005)(26005)(105586002)(2906002)(106356001)(186003)(7736002)(68736007)(16526019)(52116002)(7696005)(25786009)(48376002)(50466002)(6116002)(3846002)(6666003)(16586007)(36756003)(316002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0802MB2545; 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; AM5PR0802MB2545; 23:ctBwssVzJm+HJk8d1L+PUj7Ka6bVdREMziLGzKu?= =?us-ascii?Q?Z3hH6oIajlc6gVMBIL8gluZ47fgchXMdcrZ6+N4xFjVQv9mTGJsLzGrgX20A?= =?us-ascii?Q?skwMCwNqNuHUiI7L4n6F3CSqIHmhjEGRCYekOdbLcJ6eeD1OCMy239kB2hrG?= =?us-ascii?Q?n31A1fcx9L8dUcxPuPke/T/3R5gXI+8TdcFbgjGxttfpDIj3/oFpeNkB/Hg1?= =?us-ascii?Q?AqJ8D9QYDRnGbgRIJfNgb5oRQbGq8aA0QYUZV97x0AL+440swHmX8Oepx8pH?= =?us-ascii?Q?P+M6Xg+qZYog2Z5TKR5/b9YM0c8NZkwn6ydDm6cTZsFEhxw4U8qwSCeRgDD+?= =?us-ascii?Q?NT/vZ1CuISV6eQBo3J3WQrUc50oUMMF5xPffxuz/02QyCH6kTZayHqczva41?= =?us-ascii?Q?GUj4PHYC8zda8r38rTs//QdFrG4dswMRvYkULPrJ+flL/F+yf03wffowP8jv?= =?us-ascii?Q?R54UIiDaT5dOiZnmrBcnIgjdv8RbFOWqukaL8woTwiRKQ2siI21L6HUZfxgs?= =?us-ascii?Q?IK5ln0zl8dqcgMFhMfxR2D8CoE4kKZev0NrBPBVBh1UwoEw0DkSxVcUXwK1e?= =?us-ascii?Q?kPaVx5BRjfsrmh25y1OKMwa9aQELlpVToYLJVzjrRGkHmbOy7DOzoVOd21pd?= =?us-ascii?Q?V+2J8eHjXVrzdVTy+5L44DsgQjEaClAmki5qAxWf0+6rIMeloEfjQmQtdk49?= =?us-ascii?Q?AfXeiEFmrxjrQpVPnXME+mIjy7J2W38br7du1xc/mlSCZhpPi7iUA/MNz6ok?= =?us-ascii?Q?LQpJ0FJWtoApfduH+Fb7N1RdcAd1PER5760trxUHLGrtLYgQL37XW3702Hps?= =?us-ascii?Q?y2gkME2CBFiu8rQ6GmOt1CPKP9nzpHC9yWbqJBFaTt+J14J6UxSJq4q3N9Km?= =?us-ascii?Q?0Iiedc4rcaZDL518FKFquShWOrBb20oOWoP2cpDv9hIFFKNlp09YWMB79G0f?= =?us-ascii?Q?5NAd4k75Tu9oSc3H5mANZjvCQuMOBuBLQEX1185+eQu89eLgag+SOebBwUEu?= =?us-ascii?Q?JHKQKhrIQNvdwlHzTzlQbhdL9b1u0cBT3teD0lck/1LpksrBsSsbR/eemLy5?= =?us-ascii?Q?Bh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wrebPIL4KrshR97ZuieND29cKwKlQ0uitdBakmc5szzDB5kBZZRruz3yvTvf/JHoOvxTRNIT+BkB8=; 24:8bm4C+8xSNVyzq+g6Z3OlFgZRikf/XiTph0mGflq38CpPKRx3y/jWU4xsh/1liX+IHCXoRZEn6r5C7z/LQcPtsnXGLGH1E5yqBrfSYLQPz0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0802MB2545; 7:z9CPCQcveECcSIxE20YtG554Np7PQ+Dfi0okgznIStxCHGpo8UQRRjF8Hut3x/4DN6qcxsLdqJJtmiwhsy9SPTWW3o1pxCdgXAsXBGWMZ2OtNJhgusiDS4HQxXlAK7EL4DjWuID445qp4iKU7Uun4OFYFVXVAdD3yaqzFcyB1s/zeaUNfWghCpieNxbOEGXfAoooXrn3kt9z1N3rA7YE0LFSf1IY5Qd4hXa64Nwr/bULEA+IweBVETY7VB8rrlFD X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2018 08:49:05.8190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dfb493b4-9117-4dcc-4502-08d5e7d45391 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2545 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 --- 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..3664da9 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -616,6 +616,8 @@ 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; + int num_encoders = 0; /* number of lines for the R, G and B output */ u8 output_width[MAX_OUTPUT_CHANNELS]; int ret = 0, i; @@ -737,6 +739,14 @@ static int malidp_bind(struct device *dev) goto bind_fail; } + list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) { + num_encoders++; + } + + list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) { + encoder->possible_clones = (1 << num_encoders) - 1; + } + ret = malidp_irq_init(pdev); if (ret < 0) goto irq_init_fail;