Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp360588rdb; Wed, 17 Jan 2024 04:26:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRWEnR2zmhNOPDKJvd+9AAk8nmi0+IN9EWV/ihhZjHO0Kzy2P1iF4rvPQLlgZG9KKsy9x8 X-Received: by 2002:a05:6a21:6da0:b0:19a:63ab:bd84 with SMTP id wl32-20020a056a216da000b0019a63abbd84mr10092746pzb.60.1705494412578; Wed, 17 Jan 2024 04:26:52 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b27-20020aa78edb000000b006db74c3ee73si1461549pfr.245.2024.01.17.04.26.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 04:26:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28950-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="SH6Nqn/x"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-28950-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1601B289F05 for ; Wed, 17 Jan 2024 12:18:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2FF11DFE5; Wed, 17 Jan 2024 12:18:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="SH6Nqn/x" Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2044.outbound.protection.outlook.com [40.107.21.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFD4C1DFCD for ; Wed, 17 Jan 2024 12:18:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.44 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705493920; cv=fail; b=dxwMJ6YwPm5Ej82LmivNyOowzWB53QJXD6DxNiodAScjiZoxEpvcof+IzhBEKKym1XDT9gnSc/Zehnp8m/RAMkyXUWIY7g0AcxEUHC3J0/FUOkO+vHMgaO24z0KoihLBgc6goKFagwmO7fDAX0LIVn6qSDytk02xgQkw1QH5s4I= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705493920; c=relaxed/simple; bh=2fW8OlSOk66qitKTITHUwyoXzxUrUHaM+NbMMl86c8s=; h=ARC-Message-Signature:ARC-Authentication-Results:DKIM-Signature: Received:Received:Date:From:To:Cc:Subject:Message-ID:References: Content-Type:Content-Disposition:In-Reply-To:X-ClientProxiedBy: MIME-Version:X-MS-Exchange-MessageSentRepresentingType: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; b=JP+uLi306sfzIGAAOawAd97gFLtWtbj3z88ZxrcpnCITyoOkBZ/Gyw6n+6FFgqhxzTGGX4t98t0KSOVisnxmby3yYAJBTaBdtAtKCf6pKKtbc4g7doPDJPwZMjH1wR8h/f8WaUTI7m6F5BZkW1884O7F0TP8L8lDvZMu6f9Xlrs= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=SH6Nqn/x; arc=fail smtp.client-ip=40.107.21.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ksAmiV0FZ5rT6LosUzlwLlzdcqcBEZevfm2RXFD0Gl3QWYwtEKJZM86h4b/wcZwyzVkS0nJh5oQMtL3v2ExyszCS9wl29KkiE6o+x6bMgYW+3QZApeuveCLvIFk5WlpaIORCyxH5oqkRD/fSd5a0duVw9+Io0f1JXP60wySU7nSJX//c2wXaGEPG9KDuq8Mxcg99L/c6OTgJTnY1PgptBsWlW3mIf00s2pkhVwGnqKIo1JBysmSwCkxWcVftD+2X+5wph6rB3V7ywi3f+ssil4gXarHO2swdhicTaSZWVdt9+4mk05xMazfYtmk9C8NFK6HlcXkJ4waM/yJXdHQzqQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=et/MOVY2ukvhUg8UVg7ouX4HHaPHj05vBJqgu6kIb6s=; b=bkFWTYnT2it4fIG5RUm/+kwgwqh+sqvjfE3U+HmTnavQYmyCebOBksvk/8JtokI2c/qagPg1yZTRGomLK1e+XxOuCBgegcI0mLYm5sN5FL4g7jJOGEm/8vQJaRHcXC2cOGZvUozHWC6fJjygGMRxo8OaB4Wsw4SZ4dzrTNFOVTSecrgf9KaYNceWOWWjl8l5/oXsJv6eGE1ANdoGDAiUsdHUNTBg3Vk1kW9zz7G2DV0Xa+YosjBNGtxV2J53F+QpKh4nYwfkQ/Wsp5fCd5wToM9j7IKVmifwi5BadytzGomLEQP3y9xM6DfK7Lp/TsbfKeh21d2u6SlUdOLBUPxm1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=et/MOVY2ukvhUg8UVg7ouX4HHaPHj05vBJqgu6kIb6s=; b=SH6Nqn/xYamJiHhab0ErhPcjp/CKh/keLC6RaoiAPKX1OUFHAmcEx4IuO/6LMGF2IEPI/bDC2jVDmXcMRiVh3KosnHh2lXZn3jIKyt6aJmPR6Dwox++dYSpdcN06DLYq4u6Ly604NVZxiGZiSv/Evyw+Akwe3OPDHkTRAjRBaTg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB5333.eurprd04.prod.outlook.com (2603:10a6:209:4a::22) by AM9PR04MB7699.eurprd04.prod.outlook.com (2603:10a6:20b:284::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.28; Wed, 17 Jan 2024 12:18:35 +0000 Received: from AM6PR04MB5333.eurprd04.prod.outlook.com ([fe80::4758:835a:b14a:ce80]) by AM6PR04MB5333.eurprd04.prod.outlook.com ([fe80::4758:835a:b14a:ce80%5]) with mapi id 15.20.7181.022; Wed, 17 Jan 2024 12:18:35 +0000 Date: Wed, 17 Jan 2024 14:18:31 +0200 From: Laurentiu Palcu To: Philipp Stanner Cc: Lucas Stach , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] drm/imx/dcss: request memory region Message-ID: <20240117121831.4dvwmirt4yy4h75x@fsr-ub1664-121.ea.freescale.net> References: <20240111101346.15193-2-pstanner@redhat.com> <20240111101346.15193-3-pstanner@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240111101346.15193-3-pstanner@redhat.com> X-ClientProxiedBy: AM0PR04CA0122.eurprd04.prod.outlook.com (2603:10a6:208:55::27) To AM6PR04MB5333.eurprd04.prod.outlook.com (2603:10a6:209:4a::22) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB5333:EE_|AM9PR04MB7699:EE_ X-MS-Office365-Filtering-Correlation-Id: 30d1743a-688d-4719-58a3-08dc17566d06 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7h7+h1JONiNkrfK9FfcvXglxNhlMI7tVviGfSvlQ8t+ItXaobBQGdDlC34yKuEmqTSLVXo0X4sTaEjvA3uum95+0W+yigLEZVEIZuYj8NX09R59QjsNLNpWItACgLfWJM5X0ylfe/pES3sBAfM5jDbIabhnMEU0tX5lYPVEkSxxPS+UtIvt2I7GsPlSPGpXVAm11adt7qhuYyf8JWG0DR4FDtgOL88qViT4I/XvdDU/qEG3vWqq1fdolMLT32GPbsAyDLsokYGXavAHJ8Y/6fC6gogTblXfNjEA+0nG6Dk1DbmBxxbBi4DhK9Qva/GNMYH3H6LuPFCRrRhzkjnJxkf2/AStdtUOlsnRQmiyU8VQqnfJp7eyYGw5n6qvPcc+v7EiFTlnPcYUD87jZrTuqk308U5RByMYozN67qEX1cdW22f7fZXI3RgvCNnjmdU1Xzqx/8h+ASx4SO8RJxchFymuE5y6sKEDTmD+NBUwBX5szHxrVfD7ybhaqUtn9OFVTYB64LkQHuiAkx1bEoENhWOqhLjvG948QDk9TzFGSGxMCrK78aLYf3Z0wGWbVADMI X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB5333.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(136003)(346002)(39860400002)(366004)(376002)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(6666004)(2906002)(41300700001)(86362001)(38100700002)(6506007)(6916009)(54906003)(9686003)(66946007)(316002)(6512007)(6486002)(26005)(66476007)(83380400001)(478600001)(7416002)(8676002)(5660300002)(4326008)(44832011)(1076003)(8936002)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?E8pUvjL45MMwzj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?= =?us-ascii?Q?ygX+dkXKEP22pD2DGlAoxyCjofoLw+CY/3FbV+pAXiEa4gL+ccNFOkFVjAdz?= =?us-ascii?Q?f5pilrNeYi6vFkcKU/Sn9+9jiSckqOQG1fT3GCDzO4iwrv5cqE9may/Ks0er?= =?us-ascii?Q?jXr8USYchknD3qVBMTC5DOvDzqpYhVxmYVFBo719q3oy2M/KphVxBbUQBPel?= =?us-ascii?Q?30NiQIvkX8A2/lMmFjcnPliZFbJcKOOZ3UIZ9r0eWgMH8MsWUzWfAQqx7WR6?= =?us-ascii?Q?DE7YKYxUeWfN9kd4mfjReuAb7prnKOc+IxjuZChhnQZCWBhLqtCyJS2sx04/?= =?us-ascii?Q?SBVOPwcCQJsMRkJ5VCxaryPS89VIsrV0kuVLF5NPp/bWnVKo5/cY6lLuM6Xl?= =?us-ascii?Q?NLPkI2rGgrBr/wC9EG6eCyBDzXYvGJTjJqoI5fNDzjbNEsmhKkM/cp92ihrN?= =?us-ascii?Q?Ly2XSz+sL+EFTvbcewiV9YG5S9LvYZWjtrHZJIsdZqdcO38gjsPmfU8ePFGL?= =?us-ascii?Q?X2KvzqWo82YAz4ReYV9KvM2df/VThYdWEXsd5BAkIJyx2ZI5yK/bkZDugvwx?= =?us-ascii?Q?06a3d1VVTZpcrVJUmoKzpt2tbJzORs2yCsDz8t6qsd/Yhr3EZK8Qc9wm19f7?= =?us-ascii?Q?IVe7+TPzEWh9wVfLLNfts5cN2HKLywY7H+Sb11ZGdfPXjBDUCle/AQjNSlsp?= =?us-ascii?Q?hsHUWFB2U2spsedvURsToWfZa+uZ+xKffhuqYPsbvZwDzdkJ0JlCJ4+IKnDr?= =?us-ascii?Q?XA=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30d1743a-688d-4719-58a3-08dc17566d06 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB5333.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2024 12:18:35.3814 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: D/85p+QhM6kbR5pu6tQHAYUSjlFGTiSYnFcqbkseB+Zv+eIeIuNUI4RO1EQ2WCDgT5fU8WAtvCUk0IF4KoHgYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB7699 Hi Philipp, On Thu, Jan 11, 2024 at 11:13:46AM +0100, Philipp Stanner wrote: > The driver's memory regions are currently just ioremap()ed, but not > reserved through a request. That's not a bug, but having the request is > a little more robust. > > Implement the region-request through the corresponding managed > devres-function. > > Signed-off-by: Philipp Stanner Reviewed-by: Laurentiu Palcu Thanks, Laurentiu > --- > drivers/gpu/drm/imx/dcss/dcss-dev.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c > index 4f3af0dfb344..d448bf1c205e 100644 > --- a/drivers/gpu/drm/imx/dcss/dcss-dev.c > +++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c > @@ -170,6 +170,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output) > struct resource *res; > struct dcss_dev *dcss; > const struct dcss_type_data *devtype; > + resource_size_t res_len; > > devtype = of_device_get_match_data(dev); > if (!devtype) { > @@ -183,6 +184,12 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output) > return ERR_PTR(-EINVAL); > } > > + res_len = res->end - res->start; > + if (!devm_request_mem_region(dev, res->start, res_len, "dcss")) { > + dev_err(dev, "cannot request memory region\n"); > + return ERR_PTR(-EBUSY); > + } > + > dcss = kzalloc(sizeof(*dcss), GFP_KERNEL); > if (!dcss) > return ERR_PTR(-ENOMEM); > -- > 2.43.0 >