From patchwork Mon Aug 12 14:35:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 13760701 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2105.outbound.protection.outlook.com [40.107.236.105]) (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 33861181BA8; Mon, 12 Aug 2024 14:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.105 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723473376; cv=fail; b=ns7rbT2xfja4s5QMVOFqSRTvPfzWKhdytFh5646g3PEPfHDPf0nscxINGE5KmWKnJ1E//LSipfLjD+99JUXYvOWPOX7cF+S8RXgSKT5KidUmceVxujg4OHewGy57Ttavky7xDbsrvToZoTQpcGvZ0pvgFbBZgmWSyonqU97aH4Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723473376; c=relaxed/simple; bh=jVzYQIPiVT3EwzfZjHI4FjlMqGSQkR4iRXAZxZXZdEA=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=lWd62G15SFEwkd3961d4wmgzxX0E5wct2nC3VfVMsXTVeagT7Q0JZGKUFmHE9GUMy0AoGlOL3uQArZgKd0wn8/+y3lD4LPoxBFQo59K+EvwQ1pV4kQIrxUjRIIRLv13IV4sRxQI9C4BU4cdDDDD7/aS7oaQsdsFcS9oNbE+VKHY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inmusicbrands.com; spf=pass smtp.mailfrom=inmusicbrands.com; dkim=pass (1024-bit key) header.d=inmusicbrands.com header.i=@inmusicbrands.com header.b=XAJ1XCCe; arc=fail smtp.client-ip=40.107.236.105 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inmusicbrands.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inmusicbrands.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inmusicbrands.com header.i=@inmusicbrands.com header.b="XAJ1XCCe" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BGk8F2+0PyzztSCFRBoLjSeRehfYwgNb27ytW8uNXZM0Ck86XP4vRRu90FRqZ4K8USowmaOAqexls9EBYiyooew6HU4X6PRS68IlHhLn/uODxjpDjslC7yX/v1Gsf193/SZ9xo2UeE2/8qCgw87Kn74mcXB9PT0q/MsDn2/qJdI0Tcykw3EmXl77UOvjpcKh7YgEctNaWBLDmYImPK6ZKDe7RkqiNed+tItF2sQ650sVHPV/wGtSQDzXLdfClyB5sRBudBFff5oukk2q9juGIAY4Gbpo5HdeBOPQg4/cr2ZIG7Tj4rnD9cviLzCfwSVxTnr8At//P/dspc4SnTVEbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=9r9T3XikLPiAvkoyT1wYTUxOmRsPcZyiaXeGynTlcyI=; b=xqAbwarSlFXD3Ih6juUcZY8mWZ9IbBuA5NzXbPa/8Z7HmAVcbDmI63RqBgevEWQhomYt6m9C3Vig84vXmsi0Wqb9kq/+mjMr5gWOasGsx918m0XklQfhVmIiGgS+egxwRboHz/KUA1S3v4EpY0GZevS/C2s+JPAZhvXqE55i/TpWGOTw5ayJP7pYu3h2sg024GuR5QsGATIdce+uEoRQpDh7o2Sd7NfXzXGHtUjU0OkgGEzMPYiVduxFWwVLaJunb8D/xzXclSoUj1IGkGtqtpxq92xnialCSWvjlBFHpPzPutforiSIfb+/A9MUrz1jBU0+PeNCtnCjB4qgFTvLWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=inmusicbrands.com; dmarc=pass action=none header.from=inmusicbrands.com; dkim=pass header.d=inmusicbrands.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inmusicbrands.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9r9T3XikLPiAvkoyT1wYTUxOmRsPcZyiaXeGynTlcyI=; b=XAJ1XCCet55Ssv58mmFrVbR0AFhJ8sYx0abyYgHYRxGxxJnv9jKTX7n6jh99dCFSBg2+obDyUQx+yj3aiG33yKHWUOBndwojwSimYffaDq0T/IY5FL3yxgZRpt1cmoLNJXnaJR1Jv/3IY9dZDKfc5KL6+LDDkMZ41OkvUawRz3k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=inmusicbrands.com; Received: from MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) by DM6PR08MB6377.namprd08.prod.outlook.com (2603:10b6:5:1f2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20; Mon, 12 Aug 2024 14:36:09 +0000 Received: from MW4PR08MB8282.namprd08.prod.outlook.com ([fe80::55b3:31f1:11c0:4401]) by MW4PR08MB8282.namprd08.prod.outlook.com ([fe80::55b3:31f1:11c0:4401%5]) with mapi id 15.20.7849.019; Mon, 12 Aug 2024 14:36:09 +0000 From: John Keeping To: linux-media@vger.kernel.org Cc: John Keeping , Jacob Chen , Ezequiel Garcia , Mauro Carvalho Chehab , Heiko Stuebner , Hans Verkuil , Michael Tretter , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: platform: rga: fix 32-bit DMA limitation Date: Mon, 12 Aug 2024 15:35:55 +0100 Message-ID: <20240812143555.530279-1-jkeeping@inmusicbrands.com> X-Mailer: git-send-email 2.46.0 X-ClientProxiedBy: LO4P123CA0298.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:196::15) To MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR08MB8282:EE_|DM6PR08MB6377:EE_ X-MS-Office365-Filtering-Correlation-Id: f2bfe311-08c0-4848-37e0-08dcbadc1b54 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|52116014|1800799024|7416014|38350700014; X-Microsoft-Antispam-Message-Info: 22D4s8LnMbgFOeSTiPeIxDSXUZetH/zQnBXVkG+sHuxNCfShy17EakX1QfQGPRI2pvHzKCCnGo4H3B+JGe6+uwpiIL6nVpZTj8V1xvhZMPnekZ64SzBZBJxdCuyRQJnSHQFXNNicDTzA3DO9DLgZgwMxPqUarDwJFstJP50yqIhQ+hyPL/b3BkI0L6frtKiaNT9kSxcI1GGUe3TVURY/tUjroadr3DKnxTFgG3S2nXdUHlQLXOAAqu7krpV09cp6SZJ22+FRhNdL87Ab4C55XVgycoB/Bjj3+Ko2QfNln9IbsXDM8IL7VknmEZFJ3K+VZD/Wy30K/Yi9h8z44/D8ssVUFLyfLaJYgV68kYq/MbWsuR1gyj8lFLHIlVXabp9Usy+NzMV3GAB6y8nPT72PZgfg8zJEPs+XDm8d+dxelwrYQ/gopKudy7S7O6vlKZwuRd2opMNibrkgR3zzzcNevhYYavLYgL3RC/BuDHo8L1hh7ZdDuXVYaBuQdDWcNE7WXGGVt2Hp2BGmRCWRGOEw8jGCf2IcjmwZnIDiMHI/ritEJZwLKzzTi3Ue436Sol8AenrcSsfIQqi2RwEFzsZifoU6RnOJ4cFbUUeRvVjUnrOm4l9fDLC7yOKoCBkBJR7W94OUxTNVOOW68vLudYn3S307XrPQQrJ0UjKo4wZjqG+IxnchdsJ7twVChPAUzKtDz6NUX6JXwJlY255WTI3aFhrPRTL7O3/26oIUqwXomympOLHiQPkPT98n+wv6npBfB9OBYC+01tFwqFMKsJ2xhyyUjykH4i5J+1NJFRAzs7jNv7mpAcjn3xAhHF+kf0z6r6LCYpPoOiA4KixfTcqWYwf88cLwl2MC3T7TRckGRrxKvCMxilHXsZfPixhG1UmLDCLVI9bQYL6UEXLm6x6J9RO1W/NRwt7S0uC11EEl1XSXdwaJgVL2Bi9lwypMErcDO3sqXR5fOesrOkGznwpFVOxlfYQdgdF0w99kYzkhlNs61gmWk1AtgR7n3Dv3GoDz/wX8T+8SuBp7Ag1eeJN6tJO2M5Aos5wuG6+eQmEiAJLAHvYertwC9S2BR8wTuNIrd3cscMtWYwQ4K4qt4pYDRNzSqGN1xSGoOpn78tr8OMDzmry0rxPPeGUAjmX8t9GA3AoSpFkSa4DVVb9TguGJgYxLRBb0qOpRiUhdIvt3FE2LVmZl9bl/9KNXTD5KYu80VT6q+sZDWgGjMhXJAcSxMHcoqYwD8Ia9D7LFtiu2i6/TeeFVscUQdlHUDq8mVVbvB23hAFKMTVk9n9AL2L8Yrr7Xjwp9Y5bbxI9Vww3KaK/+kXrVRt4JMTHVoYqx5D8W+3sh/IF4oNGxPTDnhoxSxUHHM3dwGdiyGKOVrnO9V5dFNNA9tGmsnzEyg3bkSUwBs6lQO6QgzZ7yz+5SkxNrIQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR08MB8282.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(52116014)(1800799024)(7416014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hEu3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Idu242S9pKJALg6Xgcrd0HhxKH6D1zj94odQaFdx5o1cweKZiE+2U/9g6OR9b+iwquXdWrp0rzFSqhbJwY6qvYw4zFqRm0Km/bwjjN5VQfH/5967PXy6vdT+MtgCDaY99jn2jhexZKVXpg/1yeIIjvtsHRNzMCjgZ3/9vXCeW/DzsHJ8iZCFuOEdBBDPpNThjlsMcvMMGD7S5hP5h2hXDZsEccGl8MbQVzOFXohDroJmhynlX9+k98bBIrZwy+B1OfYoF/LIEJ/asXyOCteEVftFsHx+1PngEBImNiHZ1LoAbWJUTopPpTtgpwmhvz2DTEvCGKeK4puzDEa8SpS3S7jAOggTV6bPCbYeHck4c7ZHPUsuHDeJL79nnCri/qagIr4fMjChBc5VZf3KcLrlsbo8lQuKKtV2POso7lX4ZMcULc/+oLFVcD/KG1gFCGl+q87zQCNPfqp+PKqbThmT/ricbso4YED4WN47QgwC/ivptQTPfL+nM/CEU12KzZQNjY16FdlurFg== X-OriginatorOrg: inmusicbrands.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2bfe311-08c0-4848-37e0-08dcbadc1b54 X-MS-Exchange-CrossTenant-AuthSource: MW4PR08MB8282.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2024 14:36:09.7144 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 24507e43-fb7c-4b60-ab03-f78fafaf0a65 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eb2BhAlCQY02OMr6Xk/yhP6pu33tTKEDRe+iSM5Ow4xS0q5y6ga2YIutAXhEH1Y2bQeKFZNHe8BmXWaCpN2x2nx8TRWclQ+C2fsBbVrOIxE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR08MB6377 The destination buffer flags are assigned twice but source is not set in what looks like a copy+paste mistake. Assign the source queue flags so the 32-bit DMA limitation is handled consistently. Fixes: ec9ef8dda2a24 ("media: rockchip: rga: set dma mask to 32 bits") Signed-off-by: John Keeping Reviewed-by: Michael Tretter --- drivers/media/platform/rockchip/rga/rga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index 0e768f3e9edab..de532b7ecd74c 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -102,7 +102,7 @@ queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq) src_vq->drv_priv = ctx; src_vq->ops = &rga_qops; src_vq->mem_ops = &vb2_dma_sg_memops; - dst_vq->gfp_flags = __GFP_DMA32; + src_vq->gfp_flags = __GFP_DMA32; src_vq->buf_struct_size = sizeof(struct rga_vb_buffer); src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; src_vq->lock = &ctx->rga->mutex;