From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Kahola, Mika" <mika.kahola@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Ensure dbuf state is defined
Date: Wed, 5 Oct 2022 16:19:11 +0300 [thread overview]
Message-ID: <Yz2ETyNjMUG9e/io@intel.com> (raw)
In-Reply-To: <MWHPR1101MB2157491209187F2A19596B14EF5D9@MWHPR1101MB2157.namprd11.prod.outlook.com>
On Wed, Oct 05, 2022 at 12:25:26PM +0000, Kahola, Mika wrote:
> > -----Original Message-----
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Sent: Wednesday, October 5, 2022 2:29 PM
> > To: Kahola, Mika <mika.kahola@intel.com>
> > Cc: intel-gfx@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] [PATCH] drm/i915: Ensure dbuf state is defined
> >
> > On Wed, Oct 05, 2022 at 02:11:58PM +0300, Mika Kahola wrote:
> > > Ensure that the new dbuf state is not null. If so, throw an error,
> > > discontinue to allocate ddb and return.
> > >
> > > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > > ---
> > > drivers/gpu/drm/i915/display/skl_watermark.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c
> > > b/drivers/gpu/drm/i915/display/skl_watermark.c
> > > index d58e667016e4..4ecf3b43d6d2 100644
> > > --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> > > +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> > > @@ -638,6 +638,9 @@ skl_crtc_allocate_ddb(struct intel_atomic_state
> > *state, struct intel_crtc *crtc)
> > > u32 start, end;
> > > int ret;
> > >
> > > + if (IS_ERR(new_dbuf_state))
> > > + return PTR_ERR(new_dbuf_state);
> > > +
> >
> > You can't get here without the dbuf_state. Also even if we didn't have one
> > intel_atomic_get_new_dbuf_state() certainly shouldn't give us an error pointer
> > (you either get a valid pointer or NULL).
> Ok, so we can get a null here. Should we add a check for that one?
We can't get a null unless there is a bug somewhere. Is there one?
>
> >
> > > if (new_dbuf_state->weight[pipe] == 0) {
> > > skl_ddb_entry_init(&new_dbuf_state->ddb[pipe], 0, 0);
> > > goto out;
> > > --
> > > 2.34.1
> >
> > --
> > Ville Syrjälä
> > Intel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-10-05 13:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 11:11 [Intel-gfx] [PATCH] drm/i915: Ensure dbuf state is defined Mika Kahola
2022-10-05 11:29 ` Ville Syrjälä
2022-10-05 12:25 ` Kahola, Mika
2022-10-05 13:19 ` Ville Syrjälä [this message]
2022-10-05 12:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-10-05 23:36 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=Yz2ETyNjMUG9e/io@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kahola@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.