mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
	rfoss@kernel.org, todor.too@gmail.com, agross@kernel.org,
	andersson@kernel.org, mchehab@kernel.org,
	hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com,
	sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 10/13] media: qcom: camss: Allow clocks vfeN vfe_liteN or vfe_lite
Date: Sat, 19 Aug 2023 15:49:00 +0100	[thread overview]
Message-ID: <9e2c597b-171c-448a-b696-382da9834a4f@linaro.org> (raw)
In-Reply-To: <f0f55093-585f-4270-8ced-2c92a4808c9b@linaro.org>

On 18/08/2023 13:30, Konrad Dybcio wrote:
> On 17.08.2023 16:38, Bryan O'Donoghue wrote:
>> The number of Video Front End - VFE or Image Front End - IFE supported
>> with new SoCs can vary both for the full and lite cases.
>>
>> For example sdm845 has one vfe_lite and two vfe interfaces with the vfe
>> clock called simply "vfe_lite" with no integer postfix. sc8280xp has four
>> vfe and four vfe lite blocks.
>>
>> We need to support the following clock name formats
>>
>> - vfeN
>> - vfe_liteN
>> - vfe_lite
>>
>> with N being any reasonably sized integer.
>>
>> There are two sites in this code which need to do the same thing,
>> constructing and matching strings with the pattern above, so encapsulate
>> the logic in one function.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
>>   drivers/media/platform/qcom/camss/camss-vfe.c | 22 ++++++++++++++-----
>>   1 file changed, 16 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
>> index 8f48401e31cd3..73380e75dbb22 100644
>> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
>> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
>> @@ -437,6 +437,20 @@ void vfe_isr_reset_ack(struct vfe_device *vfe)
>>   	complete(&vfe->reset_complete);
>>   }
>>   
>> +static int vfe_match_clock_names(struct vfe_device *vfe,
>> +				 struct camss_clock *clock)
>> +{
>> +	char vfe_name[CAMSS_RES_MAX];
> VFE_MAX?
> 
> the current value of 17 would be very excessive for VFEs!
> 
> Konrad

Solving these generic and large struct resource strings is something I 
plan for another series.

Good enough ?

---
bod

  reply	other threads:[~2023-08-19 14:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 14:37 [PATCH v2 00/13] media: qcom: camss: Add parameter passing to remove several outstanding bugs Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 01/13] media: qcom: camss: Amalgamate struct resource with struct resource_ispif Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 02/13] media: qcom: camss: Start to move to module compat matched resources Bryan O'Donoghue
2023-08-18 12:22   ` Konrad Dybcio
2023-08-17 14:38 ` [PATCH v2 03/13] media: qcom: camss: Pass icc bandwidth table as a platform parameter Bryan O'Donoghue
2023-08-18 12:22   ` Konrad Dybcio
2023-08-17 14:38 ` [PATCH v2 04/13] media: qcom: camss: Pass remainder of variables as resources Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 05/13] media: qcom: camss: Pass line_num from compat resources Bryan O'Donoghue
2023-08-18 12:27   ` Konrad Dybcio
2023-08-17 14:38 ` [PATCH v2 06/13] media: qcom: camss: Assign the correct number of RDIs per VFE Bryan O'Donoghue
2023-08-18 12:26   ` Konrad Dybcio
2023-08-17 14:38 ` [PATCH v2 07/13] media: qcom: camss: Use >= CAMSS_SDM845 for vfe_get/vfe_put Bryan O'Donoghue
2023-08-18 12:28   ` Konrad Dybcio
2023-08-18 12:29     ` Konrad Dybcio
2023-08-19 14:56       ` Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 08/13] media: qcom: camss: Untangle if/else spaghetti in camss Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 09/13] media: qcom: camss: Improve error printout on icc_get fail Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 10/13] media: qcom: camss: Allow clocks vfeN vfe_liteN or vfe_lite Bryan O'Donoghue
2023-08-18 12:30   ` Konrad Dybcio
2023-08-19 14:49     ` Bryan O'Donoghue [this message]
2023-08-17 14:38 ` [PATCH v2 11/13] media: qcom: camss: Functionally decompose CSIPHY clock lookups Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 12/13] media: qcom: camss: Add support for setting CSIPHY clock name csiphyX Bryan O'Donoghue
2023-08-18 12:32   ` Konrad Dybcio
2023-08-19 14:21     ` Bryan O'Donoghue
2023-08-17 14:38 ` [PATCH v2 13/13] media: qcom: camss: Support RDI3 for VFE 17x Bryan O'Donoghue
2023-08-18 12:32   ` Konrad Dybcio

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=9e2c597b-171c-448a-b696-382da9834a4f@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andrey.konovalov@linaro.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=konrad.dybcio@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rfoss@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=todor.too@gmail.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

all inboxes | Powered by JetHome®