Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2547353ybh; Mon, 5 Aug 2019 02:53:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxANjx0Y3lIaqgeFxQdfjGqBGOhYgeuJIAUVEQefLyriLnRtQSuYyu4gJcoBR0CqintU4Ql X-Received: by 2002:a17:90a:8b98:: with SMTP id z24mr17428994pjn.77.1564998795926; Mon, 05 Aug 2019 02:53:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564998795; cv=pass; d=google.com; s=arc-20160816; b=gLJrsq+rSsAUTXoIoUehciziWjSbSYpvQG3EYuiGX0/AHBIv+KBbLCLykSbljCMXoB 9gQhcLdqxm5wmlopRyDPdWIQu7WziuQgzSs6Tw8iq5GvfrsAF6nXTIVeqjEAfUMbnnPH eaQu0CiF3WVze6zvo4okj26yjZhoLnbdJUvrQbw8UuA55Bsj5sgyLnyqEHVvSmFzE1Up fnmTq1QNaL75lMQspo8WpBt9ydFXfJY0i1n8AwS9ctHKfaAHOK9LGtC6+t0PP602BhiW wGB6PZE2lUVKNuf1PRPTIThhqK1+W1wVn0EYOMqDhPM2cH8MInLS2/HMe2Sa1viKIZsg 9nOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=X4KCZjkk2Qua9X1hPieafjRQTnhZzpgkKZuVTEwLDUE=; b=Ps5TwoPlNH5UB+cMMK/WQPocwweemV2u8NLgnVGlup68Knt6OFfUS9oNmiBQ4gFEi5 oR2LInuILZcr+9tm35FV8p0Ae1XOViu9k0UvZ6wq9f8TiLsnMgg6K5eo5U5hLoKdGwt1 3pR42/7hbJsiUiodZ45+OJcgE4v+XVB6Kn0rukNFYzpGlN7Yhr9MulA9V2ox2DKF5nWQ k6fj0JupfzenD+NxebfwjqgadnAyjbsS0jwCyBgZT/EwlznU9BW5svauWSccN/eBSLAn 9ZLzXSNRoWW89SrJcYrr451h97QY3Wpw1PREOIGjMURH+4cjGt+jPOgXTJbke6lrFjVG veIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KA4FDxA2; arc=pass (i=1 spf=pass spfdomain=arm.com dkim=pass dkdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s24si37778439pgi.450.2019.08.05.02.53.00; Mon, 05 Aug 2019 02:53:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=KA4FDxA2; arc=pass (i=1 spf=pass spfdomain=arm.com dkim=pass dkdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbfHEJwW (ORCPT + 99 others); Mon, 5 Aug 2019 05:52:22 -0400 Received: from mail-eopbgr30047.outbound.protection.outlook.com ([40.107.3.47]:38885 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727158AbfHEJwW (ORCPT ); Mon, 5 Aug 2019 05:52:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OsflULuYnYRUCfoJpOjqv4XiC81+vaRJms4XPiXjmDBuEgB7/0YuxKIV6a2bmkc/oyZ3+pfWnk3u/ResAeGW3vkxjNlIeCHYqgb51p93OvRKSpzZ2MJBWKT6PBfcL0pYty80Wyq+AqN6HwM90GXh1ioFYDbuWe3sQcHfNWVhRt2F7DgLT4fM9CaVuo8zV5Iot+tPlaNyUAxYLd+esnow9Z9dgp/paMH2anB2zBX/MbSqN6iAibn8sKkLWUviNuH6z9hQmS/qEGq8TQMaArKvyR0a9jhMR0QpQhVK6VLiXeIt7gskBy2mbcwVeKdNAnRKjtjEUmT2ogKPzzmHoPbJ4A== 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=X4KCZjkk2Qua9X1hPieafjRQTnhZzpgkKZuVTEwLDUE=; b=So3c3VxdByjjZMQdvUmf3GYr02eVXRtja7cFBeiNF8FAxRGMu1ODC+SjOtRPV+UaF9lqhMT0rSbhr/vrIzux026NKzLzdDyeGP/TQfLuQMuX5bSAVY3eSBmqTdu3618rBXQvlpaFEwKka+7l2Cq4SsjZyrErWJ8jUaRXf4LRINr7l8WqRev5j/14L3K+q7Ox0/E3eTlr548Lifg1VrrhAEhZn50Kp9MTy+IBq7tcwLog1ZIxhPUNr0YzWR5C6X4BhvFgKW7n84M4dl6XbghKifP+hzI7xwmkbd/WNBSWDwdS6/HMyq4PAFUHhSf7iu9ZcpFBqqn5Blp8pDc7jSu8IA== 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 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=X4KCZjkk2Qua9X1hPieafjRQTnhZzpgkKZuVTEwLDUE=; b=KA4FDxA2NmQg6x09Kcxnc3+BXZw9NxN4d4pP1nql9d/2hbQLWBu8wBv0ov2J4GjggLr3FC7eEkh5qTtjYjNm7XSSe7vbbDhDW6Rh6qZDeYsSM37yBPc0UnAaCSFSabvOMocSCOlLbyD5V0xqx1hZGhcK6Pq/0CzCFxpsCN0mPSQ= Received: from VI1PR08MB4078.eurprd08.prod.outlook.com (20.178.127.92) by VI1PR08MB3520.eurprd08.prod.outlook.com (20.177.61.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.16; Mon, 5 Aug 2019 09:52:18 +0000 Received: from VI1PR08MB4078.eurprd08.prod.outlook.com ([fe80::c8dd:d1c6:5044:a888]) by VI1PR08MB4078.eurprd08.prod.outlook.com ([fe80::c8dd:d1c6:5044:a888%3]) with mapi id 15.20.2115.005; Mon, 5 Aug 2019 09:52:18 +0000 From: Mihail Atanassov To: "dri-devel@lists.freedesktop.org" CC: Mihail Atanassov , "james qian wang (Arm Technology China)" , Liviu Dudau , Brian Starkey , David Airlie , Daniel Vetter , "linux-kernel@vger.kernel.org" Subject: [PATCH v2] drm/komeda: Add support for 'memory-region' DT node property Thread-Topic: [PATCH v2] drm/komeda: Add support for 'memory-region' DT node property Thread-Index: AQHVS3N34kDp/cF7tkmzeLrHpfGDHA== Date: Mon, 5 Aug 2019 09:52:17 +0000 Message-ID: <20190805095155.17999-1-mihail.atanassov@arm.com> References: <20190802143951.4436-1-mihail.atanassov@arm.com> In-Reply-To: <20190802143951.4436-1-mihail.atanassov@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [217.140.106.52] x-clientproxiedby: LO2P265CA0051.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::15) To VI1PR08MB4078.eurprd08.prod.outlook.com (2603:10a6:803:e5::28) x-mailer: git-send-email 2.22.0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Mihail.Atanassov@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 46cbcb7b-5fa8-4153-4278-08d7198a9a10 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:VI1PR08MB3520; x-ms-traffictypediagnostic: VI1PR08MB3520: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:243; x-forefront-prvs: 01208B1E18 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(136003)(346002)(39860400002)(396003)(366004)(40434004)(189003)(199004)(6916009)(2906002)(5640700003)(5660300002)(44832011)(5024004)(14444005)(256004)(68736007)(66446008)(66946007)(64756008)(66476007)(66556008)(2616005)(11346002)(446003)(36756003)(4326008)(2501003)(99286004)(81166006)(81156014)(71190400001)(76176011)(2351001)(305945005)(52116002)(102836004)(86362001)(476003)(8676002)(386003)(6506007)(1076003)(486006)(7736002)(54906003)(6116002)(3846002)(316002)(71200400001)(8936002)(50226002)(53936002)(478600001)(14454004)(25786009)(186003)(26005)(6512007)(66066001)(6486002)(6436002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB3520;H:VI1PR08MB4078.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: VEN3eukLl6Si86GSfhNhxZw3MASEtEIDDUSbBRBq08G+3LlX1tEhwClc8l4VLfqWsIaHRZrPZkAYV4P4TvMlqs3Pk9HSxc0JmqnaPNO1O90t0Rer2ddOle5GQTylgrHvnO+pD2Qf/0PueUlgRHiqCCPCwiOY8Dygu6dzADgNLdhHprX2qwCeNo85vul9etL317339zPbPaLvEe94tosK9sltDykLf684Y2ok7fjUtd0mYqqo858bxXxxNRExbQRcLw6I6SFp4vm7epBmYDU3jyRlLShk/PLR4Kkzd/D5Yxie8l5kya2+8P54I8ltHpvKp31ltzqkg9Yy15kbOldNaAnmi6SQ2iUgbLo6P1EGAOEQTpNDrCpY5Kxn42VUP0g9NEXhqcqklijR/hckoHY6bW8MvupDCfBcpEvHRYx/Ey0= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46cbcb7b-5fa8-4153-4278-08d7198a9a10 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2019 09:52:17.9311 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Mihail.Atanassov@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3520 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'memory-region' property of the komeda display driver DT binding allows the use of a 'reserved-memory' node for buffer allocations. Add the requisite of_reserved_mem_device_{init,release} calls to actually make use of the memory if present. Changes since v1: - Move handling inside komeda_parse_dt Signed-off-by: Mihail Atanassov --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/= drm/arm/display/komeda/komeda_dev.c index 1ff7f4b2c620..0142ee991957 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_DEBUG_FS @@ -146,6 +147,12 @@ static int komeda_parse_dt(struct device *dev, struct = komeda_dev *mdev) return mdev->irq; } +/* Get the optional framebuffer memory resource */ +ret =3D of_reserved_mem_device_init(dev); +if (ret && ret !=3D -ENODEV) +return ret; +ret =3D 0; + for_each_available_child_of_node(np, child) { if (of_node_cmp(child->name, "pipeline") =3D=3D 0) { ret =3D komeda_parse_pipe_dt(mdev, child); @@ -292,6 +299,8 @@ void komeda_dev_destroy(struct komeda_dev *mdev) mdev->n_pipelines =3D 0; +of_reserved_mem_device_release(dev); + if (funcs && funcs->cleanup) funcs->cleanup(mdev); -- 2.22.0 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.