dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
	lukas@mntmn.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Laurentiu Palcu <laurentiu.palcu@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	agx@sigxcpu.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 2/4] drm/imx: Add initial support for DCSS on iMX8MQ
Date: Fri, 6 Mar 2020 13:12:10 +0200	[thread overview]
Message-ID: <20200306111210.q7fceoahqw3mlxog@fsr-ub1864-141> (raw)
In-Reply-To: <69903c69a95902c0ddc8fb9e7a6762abf28aa034.camel@pengutronix.de>

Hi Philipp,

On Fri, Mar 06, 2020 at 11:20:51AM +0100, Philipp Zabel wrote:
> Hi Laurentiu,
> 
> On Fri, 2020-03-06 at 11:58 +0200, Laurentiu Palcu wrote:
> > On Wed, Feb 26, 2020 at 02:19:11PM +0100, Lucas Stach wrote:
> [...]
> > > > +/* This function will be called from interrupt context. */
> > > > +void dcss_scaler_write_sclctrl(struct dcss_scaler *scl)
> > > > +{
> > > > +	int chnum;
> > > > +
> > > > +	for (chnum = 0; chnum < 3; chnum++) {
> > > > +		struct dcss_scaler_ch *ch = &scl->ch[chnum];
> > > > +
> > > > +		if (ch->scaler_ctrl_chgd) {
> > > > +			dcss_ctxld_write_irqsafe(scl->ctxld, scl->ctx_id,
> > > > +						 ch->scaler_ctrl,
> > > > +						 ch->base_ofs +
> > > > +						 DCSS_SCALER_CTRL);
> > > 
> > > Why is this using the _irqsafe variant without any locking? Won't this
> > > lead to potential internal state corruption? dcss_ctxld_write is using
> > > the _irqsave locking variants, so it fine with being called from IRQ
> > > context.
> > 
> > This is only called from __dcss_ctxld_enable() which is already protected
> > by lock/unlock in dcss_ctxld_kick().
> 
> You could add a lockdep_assert_held() line to the top of this function
> to make it clear this depends on the lock being held.

Thanks for the suggestion. Will add a check.

Thanks,
laurentiu
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-03-06 11:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06  9:52 [PATCH v3 0/4] Add support for iMX8MQ Display Controller Subsystem Laurentiu Palcu
2019-12-06  9:52 ` [PATCH v3 1/4] drm/imx: compile imx directory by default Laurentiu Palcu
2019-12-06  9:52 ` [PATCH v3 2/4] drm/imx: Add initial support for DCSS on iMX8MQ Laurentiu Palcu
2020-02-24 17:27   ` Lucas Stach
2020-02-26  7:52     ` Laurentiu Palcu
2020-02-26 13:19   ` Lucas Stach
2020-03-06  9:58     ` Laurentiu Palcu
2020-03-06 10:20       ` Philipp Zabel
2020-03-06 11:12         ` Laurentiu Palcu [this message]
2019-12-06  9:52 ` [PATCH v3 3/4] dt-bindings: display: imx: add bindings for DCSS Laurentiu Palcu
2020-02-24 17:21   ` Lucas Stach
2020-02-26  7:58     ` Laurentiu Palcu
2020-02-27 11:52   ` Philipp Zabel
2019-12-11 20:16 ` [PATCH v3 0/4] Add support for iMX8MQ Display Controller Subsystem Lukas Hartmann
2020-02-21 12:15 ` Guido Günther

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=20200306111210.q7fceoahqw3mlxog@fsr-ub1864-141 \
    --to=laurentiu.palcu@oss.nxp.com \
    --cc=agx@sigxcpu.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=laurentiu.palcu@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@mntmn.com \
    --cc=p.zabel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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).