From patchwork Tue Jul 9 07:57:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Qian Wang X-Patchwork-Id: 11036615 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 CF05E13B1 for ; Tue, 9 Jul 2019 07:57:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0AC426E69 for ; Tue, 9 Jul 2019 07:57:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4573286FE; Tue, 9 Jul 2019 07:57:29 +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 178BB26E69 for ; Tue, 9 Jul 2019 07:57:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0807C89F27; Tue, 9 Jul 2019 07:57:28 +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-eopbgr40072.outbound.protection.outlook.com [40.107.4.72]) by gabe.freedesktop.org (Postfix) with ESMTPS id A323F89F27 for ; Tue, 9 Jul 2019 07:57:26 +0000 (UTC) Received: from VI1PR0802CA0048.eurprd08.prod.outlook.com (2603:10a6:800:a9::34) 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.2052.16; Tue, 9 Jul 2019 07:57:22 +0000 Received: from DB5EUR03FT056.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::209) by VI1PR0802CA0048.outlook.office365.com (2603:10a6:800:a9::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Tue, 9 Jul 2019 07:57:22 +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 DB5EUR03FT056.mail.protection.outlook.com (10.152.21.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Tue, 9 Jul 2019 07:57:20 +0000 Received: ("Tessian outbound 4988ae2fa87d:v23"); Tue, 09 Jul 2019 07:57:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2820ea00e32ee9bc X-CR-MTA-TID: 64aa7808 Received: from 193ae1e554a6.1 (cr-mta-lb-1.cr-mta-net [104.47.14.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id A110F030-A904-480F-9A8E-034CD3BEC591.1; Tue, 09 Jul 2019 07:57:11 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2051.outbound.protection.outlook.com [104.47.14.51]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 193ae1e554a6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 09 Jul 2019 07:57:11 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com (10.255.159.31) by VE1PR08MB4958.eurprd08.prod.outlook.com (10.255.158.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Tue, 9 Jul 2019 07:57:08 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::4062:a380:35ba:11d1]) by VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::4062:a380:35ba:11d1%3]) with mapi id 15.20.2032.019; Tue, 9 Jul 2019 07:57:08 +0000 From: "james qian wang (Arm Technology China)" To: Liviu Dudau , "airlied@linux.ie" , Brian Starkey , "maarten.lankhorst@linux.intel.com" , "sean@poorly.run" Subject: [PATCH 1/2] drm/komeda: Update the chip identify Thread-Topic: [PATCH 1/2] drm/komeda: Update the chip identify Thread-Index: AQHVNivobgJj65WOAkiCXqprcqpsKg== Date: Tue, 9 Jul 2019 07:57:08 +0000 Message-ID: <20190709075640.22012-2-james.qian.wang@arm.com> References: <20190709075640.22012-1-james.qian.wang@arm.com> In-Reply-To: <20190709075640.22012-1-james.qian.wang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [113.29.88.7] x-clientproxiedby: HK2P15301CA0001.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::11) To VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: ac02bdd9-ba01-4a62-3083-08d7044311d8 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:VE1PR08MB4958; X-MS-TrafficTypeDiagnostic: VE1PR08MB4958:|AM5PR0802MB2594: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:4502;OLM:4502; x-forefront-prvs: 0093C80C01 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(396003)(376002)(136003)(346002)(366004)(199004)(189003)(68736007)(66446008)(66476007)(66556008)(64756008)(1076003)(50226002)(71190400001)(486006)(2201001)(86362001)(316002)(5660300002)(2501003)(66946007)(73956011)(71200400001)(256004)(14444005)(36756003)(8936002)(15650500001)(476003)(110136005)(2616005)(81166006)(54906003)(6436002)(14454004)(81156014)(6116002)(99286004)(25786009)(305945005)(11346002)(446003)(7736002)(6486002)(478600001)(8676002)(55236004)(386003)(4326008)(6506007)(52116002)(103116003)(66066001)(76176011)(6512007)(102836004)(26005)(3846002)(53936002)(2906002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4958; H:VE1PR08MB5006.eurprd08.prod.outlook.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-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info-Original: nn1xxeuFX+iGbIhjzx8OUWhG+EUKf4KTFJRwLh6NmeLjNEzZUD/6uaF7Y33KqCmc+erEW1AFw3+ne6sRGHzQE+/a4p9BMc+4GFZFo9qyW+YAID1c2sqBEYDQy0hfVN2oLzY/EABjw+DLoQl15TX0ZFCjf6HTRG5zbpAxf6ptGTdbDkmomCj+5VzXGJMfqJplOGwFkKJrRIRzlvKVq+q6U15Wgl38gbZQM4wJ7UqBSObAqBOzp7tltryKBk2DlxtPQRbBc72C+a7vWx5c6vz1264/xLBSiffPmukt1+ARe7ZkgNPTF+OBShEULSRYRD4YORNAyUeF+FPcs32os3SqW3O0bnVOAf1yf7JTgpB7Rc1jNEZAxW3GLOhlZJNa6SeuHweBKf93S2RbP/EXKd3PH8JAaQio9PN1R7uDxsB/6xI= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4958 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT056.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)(39860400002)(376002)(346002)(396003)(136003)(2980300002)(189003)(199004)(478600001)(2201001)(103116003)(50466002)(5660300002)(54906003)(316002)(22756006)(50226002)(15650500001)(36756003)(110136005)(86362001)(26826003)(2501003)(4326008)(356004)(25786009)(14444005)(3846002)(6512007)(6486002)(63350400001)(446003)(70586007)(8676002)(81156014)(81166006)(305945005)(70206006)(6506007)(386003)(14454004)(8746002)(76176011)(7736002)(1076003)(76130400001)(102836004)(66066001)(2906002)(186003)(26005)(336012)(99286004)(23756003)(11346002)(2616005)(486006)(126002)(47776003)(63370400001)(6116002)(476003)(8936002); 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: 4a6365bb-ddd1-4034-6631-08d704430a83 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: 0093C80C01 X-Microsoft-Antispam-Message-Info: e+Gum+KNLQifgs7xobs7mPS5oizOm5R2LoVtSuuE5W6xAG3GS4zULgF6osntqWnuIJGpuyfjoV00cgnAJoVK7dze+bLpKgfTXTXAlvyO8xHTH2+k9ZOmOlKgg3ZUSWPRo1DcdfRihDqqnQQ1Z91oWbJ8aWv/V0DZCaURDUWn0fUloW7o1Wv+NQBL/UNUinKSfR/iuMYQsup81piiqThpWHEUJusfaVJDMHA9nTUlM+7bTCpxj/kc8kld3xkdoQfrbVc+Mw2XmWu0tLvKld3t57PgY8diUE8/1g9eMB2Q+Q6GSymWnKXyJsR2ZPJOFCoppqvNKX0lHpVSBzpKplAz+w9wgHIlyJg4Bn0i5JMmThF24wPGNUfPJaZPt4io9XPae75eu+K1+1rIeHSJB5eGJR25A4FGw1SGwidFfxtl9eM= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2019 07:57:20.4334 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac02bdd9-ba01-4a62-3083-08d7044311d8 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=OV9IoxJ7ddWRK+HAqdXme3VwFGlebhBmisAzraI/pqM=; b=aYj/GOlBWAlz1gqPsIZh544rvD6eXOvEOj8YM/Ml4fZz5aDMikzPfE4riVBjcNH2pCqAHgCPiauLj0svywjipC5KnUeQoxo/zIffwQhm9WjNieKyDg8wHTdJ9+YQueTN1wcLOilmOagp5TzaF29ve52e8/vr8f2BooA6hkoG7PA= 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=OV9IoxJ7ddWRK+HAqdXme3VwFGlebhBmisAzraI/pqM=; b=aYj/GOlBWAlz1gqPsIZh544rvD6eXOvEOj8YM/Ml4fZz5aDMikzPfE4riVBjcNH2pCqAHgCPiauLj0svywjipC5KnUeQoxo/zIffwQhm9WjNieKyDg8wHTdJ9+YQueTN1wcLOilmOagp5TzaF29ve52e8/vr8f2BooA6hkoG7PA= 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: nd , Ayan Halder , "Oscar Zhang \(Arm Technology China\)" , "Tiannan Zhu \(Arm Technology China\)" , "Jonathan Chai \(Arm Technology China\)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin \(Arm Technology China\)" , "Channing Chen \(Arm Technology China\)" , "james qian wang \(Arm Technology China\)" , "Yiqi Kang \(Arm Technology China\)" , "thomas Sun \(Arm Technology China\)" , "Lowry Li \(Arm Technology China\)" , Ben Davis Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 1. Drop komeda-CORE product id comparison and put it into the d71_identify 2. Update pipeline node DT-binding: *. Skip the needless pipeline DT node. *. Return fail if the essential pipeline DT node was missing. With these changes, for one family chips no need to change the DT. Signed-off-by: James Qian Wang (Arm Technology China) --- .../gpu/drm/arm/display/komeda/d71/d71_dev.c | 27 ++++++-- .../gpu/drm/arm/display/komeda/komeda_dev.c | 62 ++++++++++--------- .../gpu/drm/arm/display/komeda/komeda_dev.h | 14 +---- .../gpu/drm/arm/display/komeda/komeda_drv.c | 9 +-- 4 files changed, 60 insertions(+), 52 deletions(-) -- 2.20.1 diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c index 7e7c9e935eaf..e383a781c9e9 100644 --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c @@ -578,10 +578,27 @@ static const struct komeda_dev_funcs d71_chip_funcs = { const struct komeda_dev_funcs * d71_identify(u32 __iomem *reg_base, struct komeda_chip_info *chip) { - chip->arch_id = malidp_read32(reg_base, GLB_ARCH_ID); - chip->core_id = malidp_read32(reg_base, GLB_CORE_ID); - chip->core_info = malidp_read32(reg_base, GLB_CORE_INFO); - chip->bus_width = D71_BUS_WIDTH_16_BYTES; + const struct komeda_dev_funcs *funcs; + u32 product_id; - return &d71_chip_funcs; + chip->core_id = malidp_read32(reg_base, GLB_CORE_ID); + + product_id = MALIDP_CORE_ID_PRODUCT_ID(chip->core_id); + + switch (product_id) { + case MALIDP_D71_PRODUCT_ID: + funcs = &d71_chip_funcs; + break; + default: + funcs = NULL; + DRM_ERROR("Unsupported product: 0x%x\n", product_id); + } + + if (funcs) { + chip->arch_id = malidp_read32(reg_base, GLB_ARCH_ID); + chip->core_info = malidp_read32(reg_base, GLB_CORE_INFO); + chip->bus_width = D71_BUS_WIDTH_16_BYTES; + } + + return funcs; } diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c index 2aee735a683f..dd4a0ba1c37d 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -125,23 +125,16 @@ static int to_color_format(const char *str) return format; } -static int komeda_parse_pipe_dt(struct komeda_dev *mdev, struct device_node *np) +static int komeda_parse_pipe_dt(struct komeda_pipeline *pipe) { - struct komeda_pipeline *pipe; + struct device_node *np = pipe->of_node; struct clk *clk; - u32 pipe_id; - int ret = 0, color_format; + u32 color_format; const char *str; - ret = of_property_read_u32(np, "reg", &pipe_id); - if (ret != 0 || pipe_id >= mdev->n_pipelines) - return -EINVAL; - - pipe = mdev->pipelines[pipe_id]; - clk = of_clk_get_by_name(np, "pxclk"); if (IS_ERR(clk)) { - DRM_ERROR("get pxclk for pipeline %d failed!\n", pipe_id); + DRM_ERROR("get pxclk for pipeline %d failed!\n", pipe->id); return PTR_ERR(clk); } pipe->pxlclk = clk; @@ -163,7 +156,6 @@ static int komeda_parse_pipe_dt(struct komeda_dev *mdev, struct device_node *np) of_graph_get_port_by_id(np, KOMEDA_OF_PORT_OUTPUT); pipe->dual_link = pipe->of_output_links[0] && pipe->of_output_links[1]; - pipe->of_node = np; return 0; } @@ -172,7 +164,9 @@ static int komeda_parse_dt(struct device *dev, struct komeda_dev *mdev) { struct platform_device *pdev = to_platform_device(dev); struct device_node *child, *np = dev->of_node; - int ret; + struct komeda_pipeline *pipe; + u32 pipe_id = U32_MAX; + int ret = -1; mdev->irq = platform_get_irq(pdev, 0); if (mdev->irq < 0) { @@ -181,32 +175,46 @@ static int komeda_parse_dt(struct device *dev, struct komeda_dev *mdev) } for_each_available_child_of_node(np, child) { - if (of_node_cmp(child->name, "pipeline") == 0) { - ret = komeda_parse_pipe_dt(mdev, child); - if (ret) { - DRM_ERROR("parse pipeline dt error!\n"); + if (of_node_name_eq(child, "pipeline")) { + ret = of_property_read_u32(child, "reg", &pipe_id); + if (pipe_id >= mdev->n_pipelines) { + DRM_WARN("Skip the redandunt DT node: pipeline-%u.\n", + pipe_id); of_node_put(child); - break; + continue; } + mdev->pipelines[pipe_id]->of_node = child; + } + } + + for (pipe_id = 0; pipe_id < mdev->n_pipelines; pipe_id++) { + pipe = mdev->pipelines[pipe_id]; + + if (!pipe->of_node) { + DRM_ERROR("Omit DT node for pipeline-%d.\n", pipe->id); + return -EINVAL; } + ret = komeda_parse_pipe_dt(pipe); + if (ret) + return ret; } mdev->side_by_side = !of_property_read_u32(np, "side_by_side_master", - &mdev->side_by_side_master); + &mdev->side_by_side_master); - return ret; + return 0; } struct komeda_dev *komeda_dev_create(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); - const struct komeda_product_data *product; + komeda_identify_func komeda_identify; struct komeda_dev *mdev; struct resource *io_res; int err = 0; - product = of_device_get_match_data(dev); - if (!product) + komeda_identify = of_device_get_match_data(dev); + if (!komeda_identify) return ERR_PTR(-ENODEV); io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -240,11 +248,9 @@ struct komeda_dev *komeda_dev_create(struct device *dev) clk_prepare_enable(mdev->aclk); - mdev->funcs = product->identify(mdev->reg_base, &mdev->chip); - if (!komeda_product_match(mdev, product->product_id)) { - DRM_ERROR("DT configured %x mismatch with real HW %x.\n", - product->product_id, - MALIDP_CORE_ID_PRODUCT_ID(mdev->chip.core_id)); + mdev->funcs = komeda_identify(mdev->reg_base, &mdev->chip); + if (!mdev->funcs) { + DRM_ERROR("Failed to identify the HW.\n"); err = -ENODEV; goto disable_clk; } diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h index c70cc25d246f..f91a113b0fde 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.h +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.h @@ -51,11 +51,6 @@ #define KOMEDA_WARN_EVENTS KOMEDA_ERR_CSCE -/* malidp device id */ -enum { - MALI_D71 = 0, -}; - /* pipeline DT ports */ enum { KOMEDA_OF_PORT_OUTPUT = 0, @@ -69,12 +64,6 @@ struct komeda_chip_info { u32 bus_width; }; -struct komeda_product_data { - u32 product_id; - const struct komeda_dev_funcs *(*identify)(u32 __iomem *reg, - struct komeda_chip_info *info); -}; - struct komeda_dev; struct komeda_events { @@ -219,6 +208,9 @@ komeda_product_match(struct komeda_dev *mdev, u32 target) return MALIDP_CORE_ID_PRODUCT_ID(mdev->chip.core_id) == target; } +typedef const struct komeda_dev_funcs * +(*komeda_identify_func)(u32 __iomem *reg, struct komeda_chip_info *chip); + const struct komeda_dev_funcs * d71_identify(u32 __iomem *reg, struct komeda_chip_info *chip); diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index d6c2222c5d33..b7a1097c45c4 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -123,15 +123,8 @@ static int komeda_platform_remove(struct platform_device *pdev) return 0; } -static const struct komeda_product_data komeda_products[] = { - [MALI_D71] = { - .product_id = MALIDP_D71_PRODUCT_ID, - .identify = d71_identify, - }, -}; - static const struct of_device_id komeda_of_match[] = { - { .compatible = "arm,mali-d71", .data = &komeda_products[MALI_D71], }, + { .compatible = "arm,mali-d71", .data = d71_identify, }, {}, }; From patchwork Tue Jul 9 07:57:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Qian Wang X-Patchwork-Id: 11036617 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 13946112C for ; Tue, 9 Jul 2019 07:57:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03F6826E69 for ; Tue, 9 Jul 2019 07:57:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBDEC286FE; Tue, 9 Jul 2019 07:57:40 +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 633C426E69 for ; Tue, 9 Jul 2019 07:57:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DC0489F73; Tue, 9 Jul 2019 07:57:39 +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-eopbgr60087.outbound.protection.outlook.com [40.107.6.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A77089F73 for ; Tue, 9 Jul 2019 07:57:37 +0000 (UTC) Received: from VI1PR08CA0127.eurprd08.prod.outlook.com (2603:10a6:800:d4::29) by AM5PR0801MB1842.eurprd08.prod.outlook.com (2603:10a6:203:3c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Tue, 9 Jul 2019 07:57:34 +0000 Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::203) by VI1PR08CA0127.outlook.office365.com (2603:10a6:800:d4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18 via Frontend Transport; Tue, 9 Jul 2019 07:57:34 +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 DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18 via Frontend Transport; Tue, 9 Jul 2019 07:57:32 +0000 Received: ("Tessian outbound 8297bef43b9f:v23"); Tue, 09 Jul 2019 07:57:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ee2f6818f3d694bb X-CR-MTA-TID: 64aa7808 Received: from 6d84653107b5.2 (cr-mta-lb-1.cr-mta-net [104.47.0.50]) by 64aa7808-outbound-1.mta.getcheckrecipient.com id 146FB70C-6B2D-4E9F-A560-60CA5A9B6CCA.1; Tue, 09 Jul 2019 07:57:19 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp2050.outbound.protection.outlook.com [104.47.0.50]) by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6d84653107b5.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384); Tue, 09 Jul 2019 07:57:19 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com (10.255.159.31) by VE1PR08MB4816.eurprd08.prod.outlook.com (10.255.112.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.19; Tue, 9 Jul 2019 07:57:14 +0000 Received: from VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::4062:a380:35ba:11d1]) by VE1PR08MB5006.eurprd08.prod.outlook.com ([fe80::4062:a380:35ba:11d1%3]) with mapi id 15.20.2032.019; Tue, 9 Jul 2019 07:57:14 +0000 From: "james qian wang (Arm Technology China)" To: Liviu Dudau , "airlied@linux.ie" , Brian Starkey , "maarten.lankhorst@linux.intel.com" , "sean@poorly.run" Subject: [PATCH 2/2] drm/komeda: Enable new product D32 support Thread-Topic: [PATCH 2/2] drm/komeda: Enable new product D32 support Thread-Index: AQHVNivrN+3ktNltckK09VpQIkadOA== Date: Tue, 9 Jul 2019 07:57:14 +0000 Message-ID: <20190709075640.22012-3-james.qian.wang@arm.com> References: <20190709075640.22012-1-james.qian.wang@arm.com> In-Reply-To: <20190709075640.22012-1-james.qian.wang@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [113.29.88.7] x-clientproxiedby: HK2P15301CA0001.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::11) To VE1PR08MB5006.eurprd08.prod.outlook.com (2603:10a6:803:113::31) Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 1e1c7bfa-a3c1-4110-f218-08d704431919 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:VE1PR08MB4816; X-MS-TrafficTypeDiagnostic: VE1PR08MB4816:|AM5PR0801MB1842: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; x-forefront-prvs: 0093C80C01 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(376002)(366004)(39860400002)(346002)(189003)(199004)(66066001)(305945005)(7736002)(2201001)(64756008)(8676002)(81156014)(81166006)(66946007)(73956011)(66446008)(1076003)(8936002)(186003)(66556008)(86362001)(54906003)(110136005)(66476007)(55236004)(386003)(316002)(76176011)(6506007)(102836004)(71190400001)(71200400001)(52116002)(5660300002)(14454004)(6436002)(103116003)(68736007)(446003)(3846002)(6116002)(478600001)(4326008)(11346002)(36756003)(25786009)(6486002)(53936002)(99286004)(6512007)(50226002)(26005)(2501003)(256004)(486006)(14444005)(2906002)(2616005)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB4816; H:VE1PR08MB5006.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: rwaNevanhZYHVQN1D0uu07cLtrR1N4kAfVuYtAE86jL40xYZsf8Kd/qrpA4dZHZxIy+8CjqdqqxwF2tTXrdSQdiaXPsYlPJ2JHi5Fl9LP+1XF7K4R9q3uCkQ3qS5ssYhYAc3O6F3HpdOhL6RRx2lXRboxEIcwK8zPdzy5TX1BAAifi44zNal7row9SmFRpUuO2Sg/aZHa2Ie644Oil9EjCkMaBftKpoQDNhs7ryqLHXzIxN6bKOJiFaPIl9bbUP7NLn6RqsGJ1q2mfQZvjFDcPk6NxxJFDBtmE4Pkpo7w2zlgKRzmP2FXnrBlFeRW2iKUM6A5ALbQsU+AZKCAmvGd3ITUW0zcdFdmbqk/CHgy3sulpBh0421LToEGBAG9LQLFkjpiMES1HHv3EBFYqlOhzDfKjHir7n0ZWUGtws3BrY= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4816 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=james.qian.wang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT008.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)(39860400002)(376002)(346002)(396003)(136003)(2980300002)(189003)(199004)(336012)(36756003)(66066001)(6512007)(103116003)(7736002)(6486002)(5660300002)(50226002)(305945005)(47776003)(8936002)(2616005)(356004)(4326008)(2501003)(8746002)(446003)(6506007)(1076003)(386003)(26826003)(25786009)(22756006)(316002)(6116002)(23756003)(63350400001)(76130400001)(63370400001)(76176011)(126002)(3846002)(70586007)(86362001)(2906002)(99286004)(186003)(110136005)(486006)(478600001)(54906003)(476003)(14454004)(8676002)(11346002)(14444005)(50466002)(102836004)(81166006)(26005)(70206006)(81156014)(2201001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB1842; 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: 1131f6e0-b330-490d-da54-08d704430e28 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:AM5PR0801MB1842; NoDisclaimer: True X-Forefront-PRVS: 0093C80C01 X-Microsoft-Antispam-Message-Info: gAHj7/BY7aYGE84CBOiVjiHqwv+rNLwGhXqnovOBY50nNelYFiEnY2zCAduIfKH9Af22V/vj9Gv+ZrpAZ6R2vgrvUKy2Y31Jdsmt1PkfUk27CNDo5blNvnc6ho+9+NVy6yrcE+lnK0SsIYZM4ZNvJBn/LreNfylj2bd18+e9ClyZZbxivOq0dzlLFEvgkIO8IW5HXH3y9o97GmaGfgwJ1QYd6qPJ81aTj8QoSM6D9VNwxK6Z0qiJJSMEP7Wrg2EpLb5ZZ40Kgg6hwYbo083yMQOdURmoAo9bm4TYhmFonIyv9Yjn8EyJ7NCqzTxvrNaOVh0w72QsiQWTglKgceNQ9osKFX3SYaMSgho4/a58jCkyIw+Cd/zKa/2rIRMWXaiV3Gf1oAZPT0Uxptd4HPTTPEGRnsUdwIDGsd7e+ieXcxY= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2019 07:57:32.6114 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e1c7bfa-a3c1-4110-f218-08d704431919 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: AM5PR0801MB1842 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=DFpahTymf9bTgfzhyGJ3jRVYKfJNc5Y5uo1w/e06EXY=; b=8CCMlBZKfDjCeymC0b8lxHXK+3rTJIWCd4vc9XQ0QlBfwvA80SUrJOgVxJZyrr7GCDI0ShY/PiGKTrlk/hQz1s8wnhil5p16vV0aWsrPMBA7bM11jhiD0hpMcg/XkIl+6u1dIStAWxquN9R4NC3Lv8axSmGdAW5j+XSHuDopOWU= 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=DFpahTymf9bTgfzhyGJ3jRVYKfJNc5Y5uo1w/e06EXY=; b=8CCMlBZKfDjCeymC0b8lxHXK+3rTJIWCd4vc9XQ0QlBfwvA80SUrJOgVxJZyrr7GCDI0ShY/PiGKTrlk/hQz1s8wnhil5p16vV0aWsrPMBA7bM11jhiD0hpMcg/XkIl+6u1dIStAWxquN9R4NC3Lv8axSmGdAW5j+XSHuDopOWU= 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: nd , Ayan Halder , "Oscar Zhang \(Arm Technology China\)" , "Tiannan Zhu \(Arm Technology China\)" , "Jonathan Chai \(Arm Technology China\)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin \(Arm Technology China\)" , "Channing Chen \(Arm Technology China\)" , "james qian wang \(Arm Technology China\)" , "Yiqi Kang \(Arm Technology China\)" , "thomas Sun \(Arm Technology China\)" , "Lowry Li \(Arm Technology China\)" , Ben Davis Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP D32 is simple version of D71, the difference is: - Only has one pipeline - Drop the periph block and merge it to GCU Signed-off-by: James Qian Wang (Arm Technology China) --- .../drm/arm/display/include/malidp_product.h | 3 +- .../arm/display/komeda/d71/d71_component.c | 2 +- .../gpu/drm/arm/display/komeda/d71/d71_dev.c | 43 ++++++++++++------- .../gpu/drm/arm/display/komeda/d71/d71_regs.h | 13 ++++++ .../gpu/drm/arm/display/komeda/komeda_drv.c | 1 + 5 files changed, 44 insertions(+), 18 deletions(-) -- 2.20.1 diff --git a/drivers/gpu/drm/arm/display/include/malidp_product.h b/drivers/gpu/drm/arm/display/include/malidp_product.h index 1053b11352eb..16a8a2c22c42 100644 --- a/drivers/gpu/drm/arm/display/include/malidp_product.h +++ b/drivers/gpu/drm/arm/display/include/malidp_product.h @@ -18,7 +18,8 @@ #define MALIDP_CORE_ID_STATUS(__core_id) (((__u32)(__core_id)) & 0xFF) /* Mali-display product IDs */ -#define MALIDP_D71_PRODUCT_ID 0x0071 +#define MALIDP_D71_PRODUCT_ID 0x0071 +#define MALIDP_D32_PRODUCT_ID 0x0032 union komeda_config_id { struct { diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c index a68954bb594a..593f8b7e9bb6 100644 --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c @@ -1178,7 +1178,7 @@ static int d71_timing_ctrlr_init(struct d71_dev *d71, ctrlr = to_ctrlr(c); - ctrlr->supports_dual_link = true; + ctrlr->supports_dual_link = d71->supports_dual_link; ctrlr->supports_vrr = true; set_range(&ctrlr->vfp_range, 0, 0x3FF); diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c index e383a781c9e9..8f7c44a0b916 100644 --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c @@ -371,23 +371,33 @@ static int d71_enum_resources(struct komeda_dev *mdev) goto err_cleanup; } - /* probe PERIPH */ + /* Only the legacy HW has the periph block, the newer merges the periph + * into GCU + */ value = malidp_read32(d71->periph_addr, BLK_BLOCK_INFO); - if (BLOCK_INFO_BLK_TYPE(value) != D71_BLK_TYPE_PERIPH) { - DRM_ERROR("access blk periph but got blk: %d.\n", - BLOCK_INFO_BLK_TYPE(value)); - err = -EINVAL; - goto err_cleanup; + if (BLOCK_INFO_BLK_TYPE(value) != D71_BLK_TYPE_PERIPH) + d71->periph_addr = NULL; + + if (d71->periph_addr) { + /* probe PERIPHERAL in legacy HW */ + value = malidp_read32(d71->periph_addr, PERIPH_CONFIGURATION_ID); + + d71->max_line_size = value & PERIPH_MAX_LINE_SIZE ? 4096 : 2048; + d71->max_vsize = 4096; + d71->num_rich_layers = value & PERIPH_NUM_RICH_LAYERS ? 2 : 1; + d71->supports_dual_link = !!(value & PERIPH_SPLIT_EN); + d71->integrates_tbu = !!(value & PERIPH_TBU_EN); + } else { + value = malidp_read32(d71->gcu_addr, GCU_CONFIGURATION_ID0); + d71->max_line_size = GCU_MAX_LINE_SIZE(value); + d71->max_vsize = GCU_MAX_NUM_LINES(value); + + value = malidp_read32(d71->gcu_addr, GCU_CONFIGURATION_ID1); + d71->num_rich_layers = GCU_NUM_RICH_LAYERS(value); + d71->supports_dual_link = GCU_DISPLAY_SPLIT_EN(value); + d71->integrates_tbu = GCU_DISPLAY_TBU_EN(value); } - value = malidp_read32(d71->periph_addr, PERIPH_CONFIGURATION_ID); - - d71->max_line_size = value & PERIPH_MAX_LINE_SIZE ? 4096 : 2048; - d71->max_vsize = 4096; - d71->num_rich_layers = value & PERIPH_NUM_RICH_LAYERS ? 2 : 1; - d71->supports_dual_link = value & PERIPH_SPLIT_EN ? true : false; - d71->integrates_tbu = value & PERIPH_TBU_EN ? true : false; - for (i = 0; i < d71->num_pipelines; i++) { pipe = komeda_pipeline_add(mdev, sizeof(struct d71_pipeline), &d71_pipeline_funcs); @@ -399,7 +409,7 @@ static int d71_enum_resources(struct komeda_dev *mdev) } /* loop the register blks and probe */ - i = 2; /* exclude GCU and PERIPH */ + i = 1; /* exclude GCU */ offset = D71_BLOCK_SIZE; /* skip GCU */ while (i < d71->num_blocks) { blk_base = mdev->reg_base + (offset >> 2); @@ -409,9 +419,9 @@ static int d71_enum_resources(struct komeda_dev *mdev) err = d71_probe_block(d71, &blk, blk_base); if (err) goto err_cleanup; - i++; } + i++; offset += D71_BLOCK_SIZE; } @@ -587,6 +597,7 @@ d71_identify(u32 __iomem *reg_base, struct komeda_chip_info *chip) switch (product_id) { case MALIDP_D71_PRODUCT_ID: + case MALIDP_D32_PRODUCT_ID: funcs = &d71_chip_funcs; break; default: diff --git a/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h b/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h index 2d5e6d00b42c..da6bd535836d 100644 --- a/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h +++ b/drivers/gpu/drm/arm/display/komeda/d71/d71_regs.h @@ -71,6 +71,19 @@ #define GCU_CONTROL_MODE(x) ((x) & 0x7) #define GCU_CONTROL_SRST BIT(16) +/* GCU_CONFIGURATION registers */ +#define GCU_CONFIGURATION_ID0 0x100 +#define GCU_CONFIGURATION_ID1 0x104 + +/* GCU configuration */ +#define GCU_MAX_LINE_SIZE(x) ((x) & 0xFFFF) +#define GCU_MAX_NUM_LINES(x) ((x) >> 16) +#define GCU_NUM_RICH_LAYERS(x) ((x) & 0x7) +#define GCU_NUM_PIPELINES(x) (((x) >> 3) & 0x7) +#define GCU_NUM_SCALERS(x) (((x) >> 6) & 0x7) +#define GCU_DISPLAY_SPLIT_EN(x) (((x) >> 16) & 0x1) +#define GCU_DISPLAY_TBU_EN(x) (((x) >> 17) & 0x1) + /* GCU opmode */ #define INACTIVE_MODE 0 #define TBU_CONNECT_MODE 1 diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c index b7a1097c45c4..ad38bbc7431e 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c @@ -125,6 +125,7 @@ static int komeda_platform_remove(struct platform_device *pdev) static const struct of_device_id komeda_of_match[] = { { .compatible = "arm,mali-d71", .data = d71_identify, }, + { .compatible = "arm,mali-d32", .data = d71_identify, }, {}, };