All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: john.p.donnelly@oracle.com, dri-devel@lists.freedesktop.org,
	kraxel@redhat.com, airlied@redhat.com, sam@ravnborg.org
Subject: Re: [PATCH 4/4] drm/mgag200: Add module parameter to pin all buffers at offset 0
Date: Tue, 26 Nov 2019 10:38:45 +0100	[thread overview]
Message-ID: <20191126093845.GS29965@phenom.ffwll.local> (raw)
In-Reply-To: <20191126072545.22663-5-tzimmermann@suse.de>

On Tue, Nov 26, 2019 at 08:25:45AM +0100, Thomas Zimmermann wrote:
> For hardware that does not interpret the startadd field correctly,
> add the module parameter 'hw_bug_no_startadd', which enables the
> workaround.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/mgag200/mgag200_drv.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
> index d43951caeea0..79836b09a54a 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
> @@ -27,6 +27,10 @@ int mgag200_modeset = -1;
>  MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
>  module_param_named(modeset, mgag200_modeset, int, 0400);
>  
> +int mgag200_hw_bug_no_startadd = -1;
> +MODULE_PARM_DESC(modeset, "HW does not interpret scanout-buffer start address correctly");
> +module_param_named(hw_bug_no_startadd, mgag200_hw_bug_no_startadd, int, 0400);
> +
>  static struct drm_driver driver;
>  
>  static const struct pci_device_id pciidlist[] = {
> @@ -64,6 +68,10 @@ DEFINE_DRM_GEM_FOPS(mgag200_driver_fops);
>  
>  static bool mgag200_pin_bo_at_0(const struct mga_device *mdev)
>  {

I'd add a infor printing if the module option is non-zero that people
should submit a bug report if this fixes their issue. We don't want people
fixing bugs with module options, stuff should work by default.

With that addressed:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> +	if (!mgag200_hw_bug_no_startadd)
> +		return false;
> +	else if (mgag200_hw_bug_no_startadd > 0)
> +		return true;
>  	return mdev->flags & MGAG200_FLAG_HW_BUG_NO_STARTADD;
>  }
>  
> -- 
> 2.23.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-11-26  9:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  7:25 [PATCH 0/4] drm/mgag200: Workaround HW bug with non-0 offset Thomas Zimmermann
2019-11-26  7:25 ` [PATCH 1/4] drm/mgag200: Extract device type from flags Thomas Zimmermann
2019-11-26  7:25 ` [PATCH 2/4] drm/mgag200: Store flags from PCI driver data in device structure Thomas Zimmermann
2019-11-26  7:25 ` [PATCH 3/4] drm/mgag200: Add workaround for HW that does not support 'startadd' Thomas Zimmermann
2019-11-26  9:37   ` Daniel Vetter
2019-11-26  9:50     ` Thomas Zimmermann
2019-12-03 17:55       ` John Donnelly
2019-12-04  7:30         ` Thomas Zimmermann
2019-12-04  9:36           ` Dave Airlie
2019-12-06  6:14             ` Thomas Zimmermann
2019-12-06  6:50               ` David Airlie
2019-12-06  7:51                 ` Thomas Zimmermann
2019-11-26  7:25 ` [PATCH 4/4] drm/mgag200: Add module parameter to pin all buffers at offset 0 Thomas Zimmermann
2019-11-26  9:38   ` 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=20191126093845.GS29965@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=john.p.donnelly@oracle.com \
    --cc=kraxel@redhat.com \
    --cc=sam@ravnborg.org \
    --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.