All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
	intel-gfx@lists.freedesktop.org,
	"Christian König" <christian.koenig@amd.com>,
	"Michel Dänzer" <michel@daenzer.net>
Subject: Re: [PATCH 2/2] drm/amdgpu: Use per-device driver_features to disable atomic
Date: Thu, 20 Sep 2018 14:55:44 -0400	[thread overview]
Message-ID: <0c77354a-827c-7036-8018-395aa10a759d@amd.com> (raw)
In-Reply-To: <20180913163147.27900-2-ville.syrjala@linux.intel.com>

On 2018-09-13 12:31 PM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Disable atomic on a per-device basis instead of for all devices.
> Made possible by the new device.driver_features thing.
> 
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Michel Dänzer <michel@daenzer.net>
> Suggested-by: Michel Dänzer <michel@daenzer.net>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 6870909da926..8c1db96be070 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -816,17 +816,13 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
>  	if (ret)
>  		return ret;
>  
> -	/* warn the user if they mix atomic and non-atomic capable GPUs */
> -	if ((kms_driver.driver_features & DRIVER_ATOMIC) && !supports_atomic)
> -		DRM_ERROR("Mixing atomic and non-atomic capable GPUs!\n");
> -	/* support atomic early so the atomic debugfs stuff gets created */
> -	if (supports_atomic)
> -		kms_driver.driver_features |= DRIVER_ATOMIC;
> -
>  	dev = drm_dev_alloc(&kms_driver, &pdev->dev);
>  	if (IS_ERR(dev))
>  		return PTR_ERR(dev);
>  
> +	if (!supports_atomic)
> +		dev->driver_features &= ~DRIVER_ATOMIC;
> +
>  	ret = pci_enable_device(pdev);
>  	if (ret)
>  		goto err_free;
> @@ -1078,7 +1074,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
>  
>  static struct drm_driver kms_driver = {
>  	.driver_features =
> -	    DRIVER_USE_AGP |
> +	    DRIVER_USE_AGP | DRIVER_ATOMIC |
>  	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
>  	    DRIVER_PRIME | DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ,
>  	.load = amdgpu_driver_load_kms,
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-09-20 18:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 16:31 [PATCH 1/2] drm/nouveau: Disable atomic support on a per-device basis Ville Syrjala
2018-09-13 16:31 ` [PATCH 2/2] drm/amdgpu: Use per-device driver_features to disable atomic Ville Syrjala
2018-09-13 16:38   ` Michel Dänzer
2018-09-13 16:40     ` Alex Deucher
2018-09-13 18:29       ` Ville Syrjälä
2018-09-20 18:55   ` Harry Wentland [this message]
2018-09-13 17:26 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/nouveau: Disable atomic support on a per-device basis Patchwork
     [not found] ` <20180913163147.27900-1-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-09-13 21:02   ` [PATCH 1/2] " Lyude Paul
2018-09-14  8:11     ` Daniel Vetter
2018-09-17 17:34       ` Lyude Paul
     [not found]     ` <9df77326cf0ed944e52091230df129a06872696d.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-09-14 15:04       ` Ville Syrjälä
2018-09-14  7:45 ` kbuild test robot

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=0c77354a-827c-7036-8018-395aa10a759d@amd.com \
    --to=harry.wentland@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    --cc=ville.syrjala@linux.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.