From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper
Date: Mon, 11 Mar 2019 19:48:39 +0100 [thread overview]
Message-ID: <20190311184839.GO2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190311174958.xdw4lrvf6ydeplvc@smtp.gmail.com>
On Mon, Mar 11, 2019 at 02:49:58PM -0300, Rodrigo Siqueira wrote:
> On 03/11, Gerd Hoffmann wrote:
> > Hi,
> >
> > > > IIRC the drm code checks for the atomic_enable callback presence to
> > > > figure whenever it should take the atomic or legacy code paths.
> > >
> > > It should check for drm_driver->mode_config.funcs.atomic_commit for that,
> > > see drm_drv_uses_atomic_modeset(). Anything else should be a bug.
> > >
> > > Or do you mean the fallback to the old crtc helper prepare/commit
> > > callbacks?
> >
> > Probably the later. There was some reason why I've left in the empty
> > bochs_crtc_atomic_enable() callback ...
>
> Just for checking before I start to work in this patch:
> The correct solution should be made atomic_enable and atomic_disable
> optional, right? I should do it, and check if Bochs driver really needs
> bochs_crtc_atomic_enable after my change, right?
Yup. I just tried to remember why we haven't done this yet, but I think
that was a patch to make crtc->helper_funcs optional. And that doesn't
make sense imo, since if your crtc doesn't do anything then you don't
really have an atomic driver :-) And if there's ever a legit use case for
this, then that drive probably shouldn't use the atomic helpers ...
But making crtc_helper_funcs->atomic_enable/disable optional sounds like a
good idea.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2019-03-11 18:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-10 21:21 [PATCH] drm/bochs: Fix NULL dereference on atomic_disable helper Rodrigo Siqueira
2019-03-11 6:22 ` Gerd Hoffmann
2019-03-11 10:11 ` Rodrigo Siqueira
2019-03-11 13:07 ` Gerd Hoffmann
2019-03-11 13:23 ` Daniel Vetter
2019-03-11 13:39 ` Gerd Hoffmann
2019-03-11 17:49 ` Rodrigo Siqueira
2019-03-11 18:48 ` Daniel Vetter [this message]
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=20190311184839.GO2665@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=virtualization@lists.linux-foundation.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