Hello Emil,
Emil Velikov wrote:
On 30 October 2015 at 11:16, Tobias Jakobi tjakobi@math.uni-bielefeld.de wrote:
Hello Hyungwon,
first of all thanks for reviewing the series!
Hyungwon Hwang wrote:
On Tue, 22 Sep 2015 17:54:55 +0200 Tobias Jakobi tjakobi@math.uni-bielefeld.de wrote:
- evhandler->evctx.base.version = DRM_EVENT_CONTEXT_VERSION;
- evhandler->evctx.version = EXYNOS_EVENT_CONTEXT_VERSION;
The versions must be set not using XXX_EVENT_CONTEXT_VERSION. After the versions are bumped, the event will contains wrong version info.
Hmm, I don't see how this is true. Both DRM_EVENT_CONTEXT_VERSION and EXYNOS_EVENT_CONTEXT_VERSION come from the public libdrm header. If the version in the public header is bumped, then it's also bumped here. So I don't see the issue.
The issue is that the public header defines the interface available, while you set the version that you implement. Currently those match, but if/when we expand the API (bumping the version in the header) and rebuild your program we will crash.
Hmm, I'm still not sure I understand this. Do you mean rebuilding the tests out-of-tree and then running them against a newer/older libdrm version?
Because from my understanding the tests are always build together with libdrm anyway. Or am I misunderstanding here something?
Before you ask - yes current libdrm users are not doing the right thing and should be updated one of these days.
Maybe a dumb question, but what would be the right thing to do in may case.
Define my own MY_XZY_EVENT_CONTEXT_VERSION and use these?
With best wishes, Tobias
-Emil P.S. Having some deja-vu here... I thought I mentioned this a while back.