All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	"jfalempe@redhat.com" <jfalempe@redhat.com>,
	"airlied@redhat.com" <airlied@redhat.com>,
	"sam@ravnborg.org" <sam@ravnborg.org>,
	"emil.l.velikov@gmail.com" <emil.l.velikov@gmail.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v5 0/7] drm/mgag200: Implement VBLANK support
Date: Fri, 4 Oct 2024 14:19:15 +0300	[thread overview]
Message-ID: <Zv_PM8-x5GZWFLGk@intel.com> (raw)
In-Reply-To: <f034dcb4-fe1d-4a2d-b917-1ca489b1d00b@suse.de>

On Fri, Oct 04, 2024 at 01:03:21PM +0200, Thomas Zimmermann wrote:
> Hi
> 
> thanks for your help.
> 
> 
> Am 04.10.24 um 12:01 schrieb Ville Syrjälä:
> > On Fri, Oct 04, 2024 at 11:17:02AM +0200, Thomas Zimmermann wrote:
> >> Hi
> >>
> >> Am 02.10.24 um 18:15 schrieb Luck, Tony:
> >>>> Thanks for the bug report. Can you provide the output of 'sudo lspci
> >>>> -vvv' for the graphics device?
> >>> Thomas,
> >>>
> >>> Sure. Here's the output (run on the v6.11.0 kernel)
> >> Thanks. It doesn't look much different from other systems. IRQ is also
> >> assigned.
> >>
> >> Attached is a patch that fixes a possible off-by-one error in the
> >> register settings. This would affect the bug you're reporting. If
> >> possible, please apply the patch to your 6.12-rc1, test and report the
> >> result.
> > Didn't one of these weird variants have some bug where the
> > CRTC startadd was not working? Is this one of those?
> 
> Yeah, but it seems unrelated.
> 
> > That to me sounds like maybe linecomp has internally been
> > tied to be always active somehow. Perhaps that would
> > also prevent it from generating the interrupt...
> 
> Linecomp is usually set to vtotal and that disables the irq. When set to 
> vblank_start/vdisplay_end, it acts like a vblank IRQ. But the other 
> matrox drivers I saw (fbdev, Xorg-video-matrox) set the value -1, while 
> mgag200 doesn't. So there really is an off-by-one error.

For the purposes of the interrupt it shouldn't matter
at all what the linecomp value is, as long as it's
between 0 and vtotal. The patch seemed to just care
about vblkstr which doesn't seem relevant to me.

> 
> >
> > Anyways, sounds like someone should just double check whether
> > the status bit ever get asserted or not. If yes, then the
> > problem must be with interrupt delivery, otherwise the
> > problem is that the internal interrupt is never even
> > generated. In the latter case you could try using the
> > vsync interrupt instead.
> 
> I didn't want to go into full debugging while there's a low-hanging fix 
> to try first. I'll probably take that patch anyway even if it doesn't 
> fix the reported bug.
> 
> Wrt. vsync: isn't that way to late for vblank events? Does DRM give any 
> timing guarantees? (It doesn't AFAIK.) Or does it just mean that a 
> vblank has happened at some point in the past?

It doesn't really matter when the interrupt gets signalled
as long as it's after vblank start. And since the hardware
doesn't even have double buffered register and IIRC doesn't
really care when you reprogram eg. the start address it should
matter even less. Not that it looks like you even try to
do any atomic updates from the vblank handler, so I guess
you just want this for throttling purposes?

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2024-10-04 11:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 10:44 [PATCH v5 0/7] drm/mgag200: Implement VBLANK support Thomas Zimmermann
2024-07-18 10:44 ` [PATCH v5 1/7] drm/mgag200: Use hexadecimal register indeces Thomas Zimmermann
2024-07-18 10:44 ` [PATCH v5 2/7] drm/mgag200: Align register field names with documentation Thomas Zimmermann
2024-07-18 10:44 ` [PATCH v5 3/7] drm/mgag200: Use adjusted mode values for CRTCs Thomas Zimmermann
2024-07-18 10:44 ` [PATCH v5 4/7] drm/mgag200: Add dedicated variables for blanking fields Thomas Zimmermann
2024-07-18 10:44 ` [PATCH v5 5/7] drm/mgag200: Add dedicted variable for <linecomp> field Thomas Zimmermann
2024-07-18 10:44 ` [PATCH v5 6/7] drm/mgag200: Add vblank support Thomas Zimmermann
2024-07-18 11:34   ` Jocelyn Falempe
2024-07-18 11:55     ` Thomas Zimmermann
2024-07-18 10:44 ` [PATCH v5 7/7] drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp Thomas Zimmermann
2024-10-01 22:41 ` [PATCH v5 0/7] drm/mgag200: Implement VBLANK support Tony Luck
2024-10-02  7:06   ` Thomas Zimmermann
2024-10-02 16:15     ` Luck, Tony
2024-10-04  9:17       ` Thomas Zimmermann
2024-10-04 10:01         ` Ville Syrjälä
2024-10-04 11:03           ` Thomas Zimmermann
2024-10-04 11:19             ` Ville Syrjälä [this message]
2024-10-04 11:47               ` Thomas Zimmermann
2024-10-07 13:37           ` Thomas Zimmermann
2024-10-08 18:45             ` Ville Syrjälä
2024-10-04 16:58         ` Luck, Tony
2024-10-10  9:21           ` Thomas Zimmermann
2024-10-10 16:07             ` Luck, Tony
2024-10-10 18:12               ` Luck, Tony
2024-10-11  7:03                 ` Thomas Zimmermann
2024-10-11 16:36                   ` Luck, Tony
2024-10-11 16:44                     ` Luck, Tony
2024-10-14 12:39                       ` Thomas Zimmermann
2024-10-14 17:14                         ` Luck, Tony
2024-10-15  7:13                           ` Thomas Zimmermann
2024-10-25 17:32                             ` Luck, Tony
2024-10-11  7:09   ` Jocelyn Falempe

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=Zv_PM8-x5GZWFLGk@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tony.luck@intel.com \
    --cc=tzimmermann@suse.de \
    /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.