All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH xf86-video-ati] Set correct DRM event context version
Date: Mon, 10 Apr 2017 17:37:51 +0900	[thread overview]
Message-ID: <20170410083751.19692-2-michel@daenzer.net> (raw)
In-Reply-To: <20170410083751.19692-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>

From: Daniel Stone <daniels@collabora.com>

DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. We were blindly asserting we
supported whatever version that may be, even if we actually didn't.

With libdrm 2.4.78, setting a higher context version than 2 will attempt
to call the page_flip_handler2 vfunc if it was non-NULL, which being a
random chunk of stack memory, it might well have been.

Set the version as 2, which should be bumped only with the appropriate
version checks.

Signed-off-by: Daniel Stone <daniels@collabora.com>
(Ported from xserver commit 0c8e6ed85810e96d84173a52d628863802a78d82)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 src/drmmode_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index ab11583a6..9911c0a6a 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2538,7 +2538,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
 
 	xf86InitialConfiguration(pScrn, TRUE);
 
-	drmmode->event_context.version = DRM_EVENT_CONTEXT_VERSION;
+	drmmode->event_context.version = 2;
 	drmmode->event_context.vblank_handler = radeon_drm_queue_handler;
 	drmmode->event_context.page_flip_handler = radeon_drm_queue_handler;
 
-- 
2.11.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-04-10  8:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10  8:37 [PATCH xf86-video-amdgpu] Set correct DRM event context version Michel Dänzer
     [not found] ` <20170410083751.19692-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-04-10  8:37   ` Michel Dänzer [this message]
     [not found]     ` <20170410083751.19692-2-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-04-10  9:42       ` [PATCH xf86-video-ati] " Emil Velikov
     [not found]         ` <CACvgo503KR+UdfiXQBuy7753tDhOSaF4yXP5vUvbFsw5L1ma-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-11  5:58           ` Michel Dänzer
2017-04-10 14:51       ` Deucher, Alexander
2017-04-10 14:51   ` [PATCH xf86-video-amdgpu] " Deucher, Alexander

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=20170410083751.19692-2-michel@daenzer.net \
    --to=michel-otuistvhuppr7s880joybq@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.