linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: daniel.vetter@intel.com, jgross@suse.com, konrad.wilk@oracle.com,
	airlied@linux.ie,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com
Subject: Re: [PATCH v4 2/2] drm/xen-front: Add support for Xen PV display frontend
Date: Thu, 29 Mar 2018 10:49:42 +0300	[thread overview]
Message-ID: <d5efc0d5-bfbc-9281-fb1e-3a09de3d43d9@gmail.com> (raw)
In-Reply-To: <20180329071748.GG3881@phenom.ffwll.local>

[-- Attachment #1: Type: text/plain, Size: 2279 bytes --]

On 03/29/2018 10:17 AM, Daniel Vetter wrote:
> On Wed, Mar 28, 2018 at 01:29:46PM +0300, Oleksandr Andrushchenko wrote:
>> Hi, Daniel!
>>
>> I just noticed I have missed one change in the patch:
>> the below must be static.
>>
>> On 03/28/2018 10:42 AM, Daniel Vetter wrote:
>>> +enum drm_mode_status display_mode_valid(struct drm_crtc *crtc,
>>> +		const struct drm_display_mode *mode)
>>> +{
>>> +	struct xen_drm_front_drm_pipeline *pipeline =
>>> +			container_of(crtc,
>> Could you please amend the patch in attachment
>> when merging, so I don't resend?
> Merging is up to you, as soon as you have your commit rights.
Thank you, meanwhile I'll need to rebase onto the latest drm-tip
fixing 2 more minor issues (attached) and making the driver work after
the API change [1]. So, I'll post v4 right after fd.o is back online
with the v3..v4 diff to make review simpler
> -Daniel
Thank you,
Oleksandr
>> Thank you in advance,
>> Oleksandr
>>  From 3a82d76bd3d954056b760e5d1d09e2f96a2786ef Mon Sep 17 00:00:00 2001
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>> Date: Wed, 28 Mar 2018 13:24:04 +0300
>> Subject: [PATCH] drm/xen-front: Make display_mode_valid static
>>
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>> ---
>>   drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c
>> index 545049dfaf0a..bd676be5a0db 100644
>> --- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
>> +++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
>> @@ -273,7 +273,7 @@ static void display_update(struct drm_simple_display_pipe *pipe,
>>   	drm_dev_exit(idx);
>>   }
>>   
>> -enum drm_mode_status display_mode_valid(struct drm_crtc *crtc,
>> +static enum drm_mode_status display_mode_valid(struct drm_crtc *crtc,
>>   		const struct drm_display_mode *mode)
>>   {
>>   	struct xen_drm_front_drm_pipeline *pipeline =
>> -- 
>> 2.7.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
[1] 
https://github.com/freedesktop/drm-misc/commit/0c9c7fd00e17907efb35697ecb9f2df39a0b536c

[-- Attachment #2: 0001-drm-xen-front-Free-page-on-event-channel-error-path.patch --]
[-- Type: text/x-patch, Size: 1413 bytes --]

>From e16847ef23d19106c6855951674624bfd37e4209 Mon Sep 17 00:00:00 2001
From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Date: Thu, 29 Mar 2018 08:54:25 +0300
Subject: [PATCH 1/2] drm/xen-front: Free page on event channel error path

While creating an event channel a page was leaked in case
of error. Fix this by freeing the page.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
 drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c
index e521785fd22b..02b6f3d9fe4c 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_evtchnl.c
@@ -186,8 +186,10 @@ static int evtchnl_alloc(struct xen_drm_front_info *front_info, int index,
 				sring, XEN_PAGE_SIZE);
 
 		ret = xenbus_grant_ring(xb_dev, sring, 1, &gref);
-		if (ret < 0)
+		if (ret < 0) {
+			free_page(page);
 			goto fail;
+		}
 
 		handler = evtchnl_interrupt_ctrl;
 	} else {
@@ -195,8 +197,10 @@ static int evtchnl_alloc(struct xen_drm_front_info *front_info, int index,
 
 		ret = gnttab_grant_foreign_access(xb_dev->otherend_id,
 				virt_to_gfn((void *)page), 0);
-		if (ret < 0)
+		if (ret < 0) {
+			free_page(page);
 			goto fail;
+		}
 
 		gref = ret;
 		handler = evtchnl_interrupt_evt;
-- 
2.7.4


[-- Attachment #3: 0002-drm-xen-front-Align-documentation-title-w-other-driv.patch --]
[-- Type: text/x-patch, Size: 1162 bytes --]

>From a6668b48003b46cd711f7e56faaf35dbad769c03 Mon Sep 17 00:00:00 2001
From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Date: Thu, 29 Mar 2018 09:13:11 +0300
Subject: [PATCH 2/2] drm/xen-front: Align documentation title w/ other drivers

Align title of the documentation for the driver with the rest of the drivers,
e.g. have drm/xen-front in front of the title.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
 Documentation/gpu/xen-front.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/gpu/xen-front.rst b/Documentation/gpu/xen-front.rst
index 8188e03c9d23..009d942386c5 100644
--- a/Documentation/gpu/xen-front.rst
+++ b/Documentation/gpu/xen-front.rst
@@ -1,6 +1,6 @@
-====================================
-Xen para-virtualized frontend driver
-====================================
+====================================================
+ drm/xen-front Xen para-virtualized frontend driver
+====================================================
 
 This frontend driver implements Xen para-virtualized display
 according to the display protocol described at
-- 
2.7.4


  reply	other threads:[~2018-03-29  7:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28  6:47 [PATCH v4 0/2] drm/xen-front: Add support for Xen PV display frontend Oleksandr Andrushchenko
2018-03-28  6:47 ` [PATCH v4 1/2] drm: Use srcu to protect drm_device.unplugged Oleksandr Andrushchenko
2018-03-28  7:20   ` [Intel-gfx] " Daniel Vetter
2018-03-28  6:47 ` [PATCH v4 2/2] drm/xen-front: Add support for Xen PV display frontend Oleksandr Andrushchenko
2018-03-28  7:42   ` Daniel Vetter
2018-03-28  7:53     ` Oleksandr Andrushchenko
2018-03-28 10:29     ` Oleksandr Andrushchenko
2018-03-29  7:17       ` Daniel Vetter
2018-03-29  7:49         ` Oleksandr Andrushchenko [this message]
2018-03-29  7:39   ` [RFC PATCH] drm/xen-front: display_mode_valid() can be static kbuild test robot
2018-03-29  7:39   ` [PATCH v4 2/2] drm/xen-front: Add support for Xen PV display frontend 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=d5efc0d5-bfbc-9281-fb1e-3a09de3d43d9@gmail.com \
    --to=andr2000@gmail.com \
    --cc=airlied@linux.ie \
    --cc=boris.ostrovsky@oracle.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).