linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: quic_mmitkov@quicinc.com, linux-media@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, robert.foss@linaro.org,
	akapatra@quicinc.com, jzala@quicinc.com, todor.too@gmail.com
Cc: agross@kernel.org, bjorn.andersson@linaro.org,
	konrad.dybcio@somainline.org, mchehab@kernel.org
Subject: Re: [PATCH 3/4] media: camss: vfe-480: Multiple outputs support for SM8250
Date: Wed, 21 Sep 2022 16:55:17 +0100	[thread overview]
Message-ID: <889049dd-2cd9-ee25-c5f5-a8a7e503a3e9@linaro.org> (raw)
In-Reply-To: <20220921141012.1709-4-quic_mmitkov@quicinc.com>

On 21/09/2022 15:10, quic_mmitkov@quicinc.com wrote:
> From: Milen Mitkov <quic_mmitkov@quicinc.com>
> 
> On SM8250 each VFE supports at least 3 RDI channels, or 4
> in case of VFE-Lite, so add appropriate IRQ setup and handling.
> 
> Signed-off-by: Milen Mitkov <quic_mmitkov@quicinc.com>
> ---
>   .../media/platform/qcom/camss/camss-vfe-480.c | 60 ++++++++++++-------
>   1 file changed, 39 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-vfe-480.c b/drivers/media/platform/qcom/camss/camss-vfe-480.c
> index 129585110393..04272d085e5b 100644
> --- a/drivers/media/platform/qcom/camss/camss-vfe-480.c
> +++ b/drivers/media/platform/qcom/camss/camss-vfe-480.c
> @@ -94,6 +94,8 @@ static inline int bus_irq_mask_0_comp_done(struct vfe_device *vfe, int n)
>   #define RDI_WM(n)			((IS_LITE ? 0 : 23) + (n))
>   #define RDI_COMP_GROUP(n)		((IS_LITE ? 0 : 11) + (n))
>   
> +#define MAX_VFE_OUTPUT_LINES	4
> +
>   static u32 vfe_hw_version(struct vfe_device *vfe)
>   {
>   	u32 hw_version = readl_relaxed(vfe->base + VFE_HW_VERSION);
> @@ -171,12 +173,25 @@ static inline void vfe_reg_update_clear(struct vfe_device *vfe,
>   
>   static void vfe_enable_irq_common(struct vfe_device *vfe)
>   {
> -	/* enable only the IRQs used: rup and comp_done irqs for RDI0 */
> +	/* enable reset ack IRQ and top BUS status IRQ */
>   	writel_relaxed(IRQ_MASK_0_RESET_ACK | IRQ_MASK_0_BUS_TOP_IRQ,
>   		       vfe->base + VFE_IRQ_MASK(0));
> -	writel_relaxed(BUS_IRQ_MASK_0_RDI_RUP(vfe, 0) |
> -		       BUS_IRQ_MASK_0_COMP_DONE(vfe, RDI_COMP_GROUP(0)),
> -		       vfe->base + VFE_BUS_IRQ_MASK(0));
> +}
> +
> +static void vfe_enable_lines_irq(struct vfe_device *vfe)
> +{
> +	u32 bus_irq_mask;
> +	int i;
> +
> +	for (i = 0; i < MAX_VFE_OUTPUT_LINES; i++) {
> +		/* Enable IRQ for newly added lines, but also keep already running lines's IRQ */
> +		if (vfe->line[i].output.state == VFE_OUTPUT_RESERVED ||
> +		    vfe->line[i].output.state == VFE_OUTPUT_ON)
> +			bus_irq_mask |= BUS_IRQ_MASK_0_RDI_RUP(vfe, i)
> +					| BUS_IRQ_MASK_0_COMP_DONE(vfe, RDI_COMP_GROUP(i));

A multi-line should be enclosed with {}

if (vfe->line[i].output.state == VFE_OUTPUT_RESERVED ||
     vfe->line[i].output.state == VFE_OUTPUT_ON) {
	bus_irq_mask |= BUS_IRQ_MASK_0_RDI_RUP(vfe, i)
			| BUS_IRQ_MASK_0_COMP_DONE(vfe, RDI_COMP_GROUP(i));
}

---
bod

  reply	other threads:[~2022-09-21 16:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 14:10 [PATCH 0/4] media: camss: sm8250: Virtual channels support for SM8250 quic_mmitkov
2022-09-21 14:10 ` [PATCH 1/4] media: camss: sm8250: Virtual channels for CSID quic_mmitkov
2022-09-21 15:47   ` Bryan O'Donoghue
2022-09-21 14:10 ` [PATCH 2/4] media: camss: vfe: Reserve VFE lines on stream start and link to CSID quic_mmitkov
2022-09-21 14:10 ` [PATCH 3/4] media: camss: vfe-480: Multiple outputs support for SM8250 quic_mmitkov
2022-09-21 15:55   ` Bryan O'Donoghue [this message]
2022-09-21 14:10 ` [PATCH 4/4] media: camss: sm8250: Pipeline starting and stopping for multiple virtual channels quic_mmitkov
  -- strict thread matches above, loose matches on Subject: below --
2022-09-26 14:25 [PATCH v2 0/4] media: camss: sm8250: Virtual channels support for SM8250 quic_mmitkov
2022-09-26 14:25 ` [PATCH 3/4] media: camss: vfe-480: Multiple outputs " quic_mmitkov
2022-10-04  9:45   ` Robert Foss
2022-09-20 14:32 [PATCH 0/4] media: camss: sm8250: Virtual channels " quic_mmitkov
2022-09-20 14:32 ` [PATCH 3/4] media: camss: vfe-480: Multiple outputs " quic_mmitkov

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=889049dd-2cd9-ee25-c5f5-a8a7e503a3e9@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=agross@kernel.org \
    --cc=akapatra@quicinc.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=jzala@quicinc.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=quic_mmitkov@quicinc.com \
    --cc=robert.foss@linaro.org \
    --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;
as well as URLs for NNTP newsgroup(s).