All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tong Zhang <ztong0001@gmail.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU" 
	<virtualization@lists.linux-foundation.org>,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU" 
	<spice-devel@lists.freedesktop.org>,
	Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"
Date: Thu, 4 Feb 2021 15:21:08 -0500	[thread overview]
Message-ID: <D78EE3A8-C7A8-4694-86E9-2E2278703A62@gmail.com> (raw)
In-Reply-To: <3feaeb62-fd50-5cca-26f7-42f6167ef77a@suse.de>



> On Feb 4, 2021, at 2:06 PM, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> 
> Hi Tong
> 
>> I have posted an updated patch.
>> The new patch use the following logic
>> +	if (!qdev->ddev.mode_config.funcs)
>> +	  return;
> 
> This is again just papering over the issue. Better don't call qxl_drm_release() in the error path if qxl_device_init() fails.
> 
> I see two solutions: either roll-back manually, or use our new managed DRM interfaces. This is what the other drivers do.
> 
> Best regards
> Thomas


IMHO - qdev->ddev.mode_config.funcs is set only if the initialization is successful,
so using this as an indicator of error case looks ok to me.

The other two options you suggested would require some serious significant amount of work to be done,
which I don’t think I currently have such ability to do.

Thanks,
- Tong


WARNING: multiple messages have this Message-ID (diff)
From: Tong Zhang <ztong0001@gmail.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
	<virtualization@lists.linux-foundation.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Dave Airlie <airlied@redhat.com>,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
	<spice-devel@lists.freedesktop.org>
Subject: Re: [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"
Date: Thu, 4 Feb 2021 15:21:08 -0500	[thread overview]
Message-ID: <D78EE3A8-C7A8-4694-86E9-2E2278703A62@gmail.com> (raw)
In-Reply-To: <3feaeb62-fd50-5cca-26f7-42f6167ef77a@suse.de>



> On Feb 4, 2021, at 2:06 PM, Thomas Zimmermann <tzimmermann@suse.de> wrote:
> 
> Hi Tong
> 
>> I have posted an updated patch.
>> The new patch use the following logic
>> +	if (!qdev->ddev.mode_config.funcs)
>> +	  return;
> 
> This is again just papering over the issue. Better don't call qxl_drm_release() in the error path if qxl_device_init() fails.
> 
> I see two solutions: either roll-back manually, or use our new managed DRM interfaces. This is what the other drivers do.
> 
> Best regards
> Thomas


IMHO - qdev->ddev.mode_config.funcs is set only if the initialization is successful,
so using this as an indicator of error case looks ok to me.

The other two options you suggested would require some serious significant amount of work to be done,
which I don’t think I currently have such ability to do.

Thanks,
- Tong

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-02-04 20:22 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 14:57 [PATCH v6 00/10] drm/qxl: fix driver shutdown issues Gerd Hoffmann
2021-02-04 14:57 ` [PATCH v6 01/10] [hack] silence ttm fini WARNING Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:58   ` Christian König
2021-02-04 14:58     ` Christian König
2021-02-05  7:39     ` Gerd Hoffmann
2021-02-05  7:39       ` Gerd Hoffmann
2021-02-04 14:57 ` [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init" Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 18:34   ` Thomas Zimmermann
2021-02-04 18:34     ` Thomas Zimmermann
2021-02-04 18:34     ` Thomas Zimmermann
2021-02-04 18:52     ` Tong Zhang
2021-02-04 18:52       ` Tong Zhang
2021-02-04 19:06       ` Thomas Zimmermann
2021-02-04 19:06         ` Thomas Zimmermann
2021-02-04 19:06         ` Thomas Zimmermann
2021-02-04 20:21         ` Tong Zhang [this message]
2021-02-04 20:21           ` Tong Zhang
2021-02-04 14:57 ` [PATCH v6 03/10] drm/qxl: use drmm_mode_config_init Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57 ` [PATCH v6 04/10] drm/qxl: unpin release objects Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57 ` [PATCH v6 05/10] drm/qxl: release shadow on shutdown Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 18:17   ` Thomas Zimmermann
2021-02-04 18:17     ` Thomas Zimmermann
2021-02-04 18:17     ` Thomas Zimmermann
2021-02-04 14:57 ` [PATCH v6 06/10] drm/qxl: properly pin/unpin shadow Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 18:18   ` Thomas Zimmermann
2021-02-04 18:18     ` Thomas Zimmermann
2021-02-04 18:18     ` Thomas Zimmermann
2021-02-04 14:57 ` [PATCH v6 07/10] drm/qxl: handle shadow in primary destroy Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57 ` [PATCH v6 08/10] drm/qxl: properly free qxl releases Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57 ` [PATCH v6 09/10] drm/qxl: simplify qxl_fence_wait Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57 ` [PATCH v6 10/10] drm/qxl: allocate dumb buffers in ram Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 14:57   ` Gerd Hoffmann
2021-02-04 18:22   ` Thomas Zimmermann
2021-02-04 18:22     ` Thomas Zimmermann
2021-02-04 18:22     ` Thomas Zimmermann

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=D78EE3A8-C7A8-4694-86E9-2E2278703A62@gmail.com \
    --to=ztong0001@gmail.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spice-devel@lists.freedesktop.org \
    --cc=tzimmermann@suse.de \
    --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 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.