Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Vishnu Reddy <quic_bvisredd@quicinc.com>,
	Vikash Garodia <vikash.garodia@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
Subject: Re: [PATCH 5/8] media: iris: Move vpu register defines to common header file
Date: Tue, 7 Oct 2025 15:23:18 +0200	[thread overview]
Message-ID: <80036e24-fb91-4bef-82e0-55b83799765a@oss.qualcomm.com> (raw)
In-Reply-To: <96aca644-8fdc-8076-c94b-ed655ac526d2@quicinc.com>

On 9/29/25 7:44 AM, Vishnu Reddy wrote:
> 
> 
> 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.
>>
>> Konrad
> 
>  Just to confirm
>  1. You’re saying it’s better to keep the register definitions for each
>  VPU generation in their own source files, instead of keeping them all
>  in a shared header. Is that right?
> 
>  2. The vpu functions (power on controller, power off controller and
>  etc.) which are common for vpu3x and vpu4x are moved to
>  iris_vpu_common.c and de-static-ize to use for both vpu3x and vpu4x.
>  (This code changes are there in [PATCH 6/8] media: iris: Move vpu35
>  specific api to common to use for vpu4)
> 
>  Will this 2nd point is fine or Do I need the keep the functions also
>  in the platform specific file and reuse for vpu4x by de-static-ize the
>  function in iris_vpu3x.c?

I think we can drop this since Vikash said it's not going to change
much for the forseeable future

Konrad

  reply	other threads:[~2025-10-07 13:23 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 [this message]
2025-10-02  9:35     ` Vikash Garodia
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=80036e24-fb91-4bef-82e0-55b83799765a@oss.qualcomm.com \
    --to=konrad.dybcio@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=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 \
    --cc=vikash.garodia@oss.qualcomm.com \
    /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