mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	"Liviu Dudau" <liviu.dudau@arm.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Patrik Jakobsson" <patrik.r.jakobsson@gmail.com>,
	"Alain Volmat" <alain.volmat@foss.st.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Jyri Sarha" <jyri.sarha@iki.fi>,
	"Alexey Brodkin" <abrodkin@synopsys.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Maíra Canal" <mairacanal@riseup.net>,
	"Zack Rusin" <zack.rusin@broadcom.com>,
	amd-gfx@lists.freedesktop.org,
	linux-mediatek@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org,
	freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	virtualization@lists.linux.dev,
	spice-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] drm: Move crtc->{x, y, mode, enabled} to legacy sub-structure
Date: Thu, 3 Oct 2024 17:07:35 +0200	[thread overview]
Message-ID: <Zv6zN7Go_XG44P2-@louis-chauvet-laptop> (raw)
In-Reply-To: <Zv6gSGMXZZARf3oV@intel.com>


> > > diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
> > > index a40295c18b48..780681ea77e4 100644
> > > --- a/drivers/gpu/drm/vkms/vkms_crtc.c
> > > +++ b/drivers/gpu/drm/vkms/vkms_crtc.c
> > > @@ -64,7 +64,7 @@ static int vkms_enable_vblank(struct drm_crtc *crtc)
> > >  	struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(crtc);
> > >  	struct vkms_output *out = drm_crtc_to_vkms_output(crtc);
> > >  
> > > -	drm_calc_timestamping_constants(crtc, &crtc->mode);
> > > +	drm_calc_timestamping_constants(crtc, &crtc->legacy.mode);
> > 
> > 	drm_calc_timestamping_constants(crtc, &crtc->state->mode);
> 
> This one doesn't look safe. You want to call that during your atomic
> commit already.
> 

This was already not safe with the previous implementation? Or it is only 
unsafe because now I use state->mode instead of legacy.mode?

After inspecting the code, I think I don't need to call it as:

In `vkms_atomic_commit_tail` (used in 
`@vkms_mode_config_helpers.atomic_commit_tail`), we call 
`drm_atomic_helper_commit_modeset_disables`, which call 
`drm_atomic_helper_calc_timestamping_constants` which call 
`drm_calc_timestamping_constants` for every CRTC.

I tested kms_vblank, all of them are SUCCESS/SKIP, do you know other tests 
that can trigger bugs?

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2024-10-03 15:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 18:21 [PATCH 0/2] drm: Treewide plane/crtc legacy state sweeping Ville Syrjala
2024-10-02 18:22 ` [PATCH 2/2] drm: Move crtc->{x,y,mode,enabled} to legacy sub-structure Ville Syrjala
2024-10-03 12:38   ` [PATCH 2/2] drm: Move crtc->{x, y, mode, enabled} " Louis Chauvet
2024-10-03 13:46     ` Ville Syrjälä
2024-10-03 15:07       ` Louis Chauvet [this message]
2024-10-03 15:29         ` Ville Syrjälä
2024-10-03 15:45           ` Louis Chauvet
2024-10-25  7:46 ` [PATCH 0/2] drm: Treewide plane/crtc legacy state sweeping Ville Syrjälä
2024-10-25  9:54   ` Dmitry Baryshkov
2024-10-25  9:59   ` Jani Nikula

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=Zv6zN7Go_XG44P2-@louis-chauvet-laptop \
    --to=louis.chauvet@bootlin.com \
    --cc=abrodkin@synopsys.com \
    --cc=alain.volmat@foss.st.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=hjc@rock-chips.com \
    --cc=inki.dae@samsung.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jyri.sarha@iki.fi \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=liviu.dudau@arm.com \
    --cc=mairacanal@riseup.net \
    --cc=nouveau@lists.freedesktop.org \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=spice-devel@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xen-devel@lists.xenproject.org \
    --cc=zack.rusin@broadcom.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®