From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 27A5F46D55D; Tue, 21 Jul 2026 15:43:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784648607; cv=none; b=hPIDQtFe3JIlLAkaGdfXqcHjHBYMc1cgYztwaw4Yhi4rB83L5mbUYXSkg3hfefL0AXboxSEEdM7pVRzJoUiVCh2dgms14xvChPmigmr0RmiZfKoaRTVq73hEBHPBa9wQNZhGow9T0AFTwQzf8aAw7lraJ4XL9XuRx+I00nX5waE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784648607; c=relaxed/simple; bh=W77RKZTsiL7AaRvKwCeVymAATpmR8+wa1Lt4SAKiidE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=l8MJsXMpWEZCJvg6VrbguwaoveWtsL0LO4bBVCwAZ5acQWI38vvbexkvLCbEqxMs500RK1/ajfpt/ALH28rpoXdp6CcaWctnIOASnfEvdyRGPvFBJYqKceNRZF1vQZevAFTjkf82IXK3ouYoGEoOI3PMZTQg+XuW3dMPmM2In2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cV2l3SPz; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="cV2l3SPz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 886A41F00A3A; Tue, 21 Jul 2026 15:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784648606; bh=+EPeOxVA9k30WRbvbzuN0ln4J+IkUDTfkb0HSHMNXps=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cV2l3SPzdwGIHaeJHfzr43iD06sj4Qcq4BUoRTafQLmbp1CjUtPMLwIrlaI+ROKI9 +O8ZSlS384FwSEGEgKipyDQBDx3eXnSlHsIM8v+igtIa/v0kPsEOhv5UFit5VS69UY pueoHDbHOn/Iy2/DEfWSw++Eb6slCvXts3A91WPM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nicolas Dufresne , =?UTF-8?q?Sven=20P=C3=BCschel?= , Hans Verkuil , Sasha Levin Subject: [PATCH 7.1 0261/2077] media: rockchip: rga: fix too small buffer size Date: Tue, 21 Jul 2026 16:58:54 +0200 Message-ID: <20260721152558.834701831@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152552.646164743@linuxfoundation.org> References: <20260721152552.646164743@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sven Püschel [ Upstream commit 65017e26c065d1240b0512c15867ef1128034fd8 ] Fix the command buffer size being only a quarter of the actual size. The RGA_CMDBUF_SIZE macro was potentially intended to specify the length of the cmdbuf u32 array pointer. But as it's used to specify the size of the allocation, which is counted in bytes. Therefore adjust the macro size to bytes as it better matches the variable name and adjust it's users accordingly. As the command buffer is relatively small, it probably didn't caused an issue due to being smaller than a single page. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Reviewed-by: Nicolas Dufresne Signed-off-by: Sven Püschel Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/platform/rockchip/rga/rga-hw.c | 2 +- drivers/media/platform/rockchip/rga/rga-hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga-hw.c b/drivers/media/platform/rockchip/rga/rga-hw.c index 43ed742a164929..d1618bb2475013 100644 --- a/drivers/media/platform/rockchip/rga/rga-hw.c +++ b/drivers/media/platform/rockchip/rga/rga-hw.c @@ -414,7 +414,7 @@ static void rga_cmd_set(struct rga_ctx *ctx, { struct rockchip_rga *rga = ctx->rga; - memset(rga->cmdbuf_virt, 0, RGA_CMDBUF_SIZE * 4); + memset(rga->cmdbuf_virt, 0, RGA_CMDBUF_SIZE); rga_cmd_set_src_addr(ctx, src->dma_desc_pa); /* diff --git a/drivers/media/platform/rockchip/rga/rga-hw.h b/drivers/media/platform/rockchip/rga/rga-hw.h index cc6bd7f5b03003..2b8537a5fd0d7a 100644 --- a/drivers/media/platform/rockchip/rga/rga-hw.h +++ b/drivers/media/platform/rockchip/rga/rga-hw.h @@ -6,7 +6,7 @@ #ifndef __RGA_HW_H__ #define __RGA_HW_H__ -#define RGA_CMDBUF_SIZE 0x20 +#define RGA_CMDBUF_SIZE 0x80 /* Hardware limits */ #define MAX_WIDTH 8192 -- 2.53.0