devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vishnu Reddy <quic_bvisredd@quicinc.com>
Subject: Re: [PATCH 5/8] media: iris: Move vpu register defines to common header file
Date: Thu, 2 Oct 2025 15:05:29 +0530	[thread overview]
Message-ID: <404e40cf-8c51-d12c-d39c-6cc83779e3ca@oss.qualcomm.com> (raw)
In-Reply-To: <ab28a715-6b5e-4adc-8889-f47ee2e18d5c@oss.qualcomm.com>


On 9/25/2025 2:40 PM, Konrad Dybcio wrote:
> On 9/25/25 1:14 AM, Vikash Garodia wrote:
>> Some of vpu4 register defines are common with vpu3x. Move those into the
>> common register defines header. This is done to reuse the defines for
>> vpu4 in subsequent patch which enables the power sequence for vpu4.
>>
>> Co-developed-by: Vishnu Reddy <quic_bvisredd@quicinc.com>
>> Signed-off-by: Vishnu Reddy <quic_bvisredd@quicinc.com>
>> Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
>> ---
>>  drivers/media/platform/qcom/iris/iris_vpu3x.c      | 36 ----------------------
>>  drivers/media/platform/qcom/iris/iris_vpu_common.c | 23 --------------
>>  .../platform/qcom/iris/iris_vpu_register_defines.h | 29 +++++++++++++++++
> 
> This is a slippery slope. I think it's better if you explicitly say
> the header file contains the register map of VPU3 instead, as let's say
> VPU5 may add a random register in the middle (pushing some existing ones
> +0x4 down). Such changes are annoying to debug, and we've unfortunately
> been there on Adreno..
> 
> Because you're using this for a single common function that is both acting
> upon the same registers and performing the same operations on them across
> VPU35 and VPU4, it's okay to de-static-ize the function from iris_vpu3.c and
> refer to it from vpu4 ops, keeping the register map private to the former
> file which I think will end up less error-prone for the future.

Appreciate your thoughts on this and trying to bring the design issues faced in
adreno. I peeked into vpu5 register map, and it follows the offsets from vpu4
and should reuse them from "iris_vpu_register_defines.h". IMO, we should be good
in reusing them for vpu4 and atleast for next generation.

Regards,
Vikash

  parent reply	other threads:[~2025-10-02  9:35 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 23:14 [PATCH 0/8] media: iris: add support for video codecs on Qcom kaanapali platform Vikash Garodia
2025-09-24 23:14 ` [PATCH 1/8] media: dt-bindings: qcom-kaanapali-iris: Add kaanapali video codec binding Vikash Garodia
2025-09-25  3:06   ` Dmitry Baryshkov
2025-09-25  7:57     ` Vikash Garodia
2025-09-25  8:59       ` Konrad Dybcio
2025-09-25 19:09         ` Vikash Garodia
2025-09-25 19:20       ` Dmitry Baryshkov
2025-09-25  5:11   ` Rob Herring (Arm)
2025-09-25  9:08   ` Krzysztof Kozlowski
2025-09-25 19:23     ` Vikash Garodia
2025-09-25 19:25   ` Dmitry Baryshkov
2025-09-25 19:31     ` Vikash Garodia
2025-09-25 19:38       ` Dmitry Baryshkov
2025-09-25 19:45         ` Vikash Garodia
2025-09-25 20:33           ` Dmitry Baryshkov
2025-09-26 11:47         ` Konrad Dybcio
2025-09-26 13:55           ` Vikash Garodia
2025-09-26 22:25             ` Dmitry Baryshkov
2025-10-02  9:18               ` Vikash Garodia
2025-10-07 13:58                 ` Krzysztof Kozlowski
2025-10-08  9:53                   ` Vikash Garodia
2025-09-24 23:14 ` [PATCH 2/8] media: iris: Add support for multiple clock sources Vikash Garodia
2025-09-25 23:59   ` Bryan O'Donoghue
2025-10-02  9:25     ` Vikash Garodia
2025-09-24 23:14 ` [PATCH 3/8] media: iris: Add support for multiple TZ CP configs Vikash Garodia
2025-09-25  9:01   ` Konrad Dybcio
2025-09-25 19:27     ` Vikash Garodia
2025-09-26 11:44       ` Konrad Dybcio
2025-09-26  0:30   ` Bryan O'Donoghue
2025-09-29  5:45     ` Vishnu Reddy
2025-09-24 23:14 ` [PATCH 4/8] media: iris: Introduce buffer size calculations for vpu4 Vikash Garodia
2025-09-26 13:00   ` Bryan O'Donoghue
2025-10-02 10:06     ` Vikash Garodia
2025-09-24 23:14 ` [PATCH 5/8] media: iris: Move vpu register defines to common header file Vikash Garodia
2025-09-25  9:10   ` Konrad Dybcio
2025-09-29  5:44     ` Vishnu Reddy
2025-10-07 13:23       ` Konrad Dybcio
2025-10-02  9:35     ` Vikash Garodia [this message]
2025-10-07 13:22       ` Konrad Dybcio
2025-10-16 13:47   ` Dmitry Baryshkov
2025-10-16 18:37     ` Vikash Garodia
2025-10-16 18:58       ` Dmitry Baryshkov
2025-09-24 23:14 ` [PATCH 6/8] media: iris: Move vpu35 specific api to common to use for vpu4 Vikash Garodia
2025-09-24 23:14 ` [PATCH 7/8] media: iris: Introduce vpu ops for vpu4 with necessary hooks Vikash Garodia
2025-09-25  9:18   ` Konrad Dybcio
2025-09-29  5:45     ` Vishnu Reddy
2025-10-02  9:41       ` Vikash Garodia
2025-10-07 13:21       ` Konrad Dybcio
2025-09-24 23:14 ` [PATCH 8/8] media: iris: Add platform data for kaanapali Vikash Garodia
2025-09-25  2:44   ` Dmitry Baryshkov
2025-09-25  8:17     ` Vikash Garodia
2025-10-02 15:10   ` Bryan O'Donoghue
2025-10-02 15:29   ` Bryan O'Donoghue
2025-10-18  6:55     ` Vishnu Reddy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=404e40cf-8c51-d12c-d39c-6cc83779e3ca@oss.qualcomm.com \
    --to=vikash.garodia@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_bvisredd@quicinc.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).