evas-drm: Fix engine to use the output's framebuffer as window id

@fix: ecore_evas_window_get expects an Ecore_Window to be returned.
Because of this, we need to have a 'window' that can be returned via
ecore_evas. For this case, we will use the output's framebuffer id as
the 'window' so we need to set that into the engine info so that
ecore_evas can fetch it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-03-18 07:29:47 +00:00
parent 18c40befc0
commit 3ec7c4b517
3 changed files with 5 additions and 4 deletions

View File

@ -469,7 +469,6 @@ evas_drm_outbuf_setup(Outbuf *ob)
drmModePlaneResPtr pres;
int i = 0;
uint64_t dumb;
unsigned int fb;
/* check for valid Output buffer */
if ((!ob) || (ob->priv.fd < 0)) return EINA_FALSE;
@ -539,7 +538,7 @@ evas_drm_outbuf_setup(Outbuf *ob)
ob->priv.crtc = crtc;
/* get the current framebuffer */
fb = _evas_drm_crtc_buffer_get(ob->priv.fd, crtc);
ob->priv.fb = _evas_drm_crtc_buffer_get(ob->priv.fd, crtc);
/* spew out connector properties for testing */
/* drmModePropertyPtr props; */
@ -576,7 +575,7 @@ evas_drm_outbuf_setup(Outbuf *ob)
(ob->priv.mode.vdisplay != conn->modes[0].vdisplay))
{
/* set new crtc mode */
drmModeSetCrtc(ob->priv.fd, ob->priv.crtc, fb, 0, 0,
drmModeSetCrtc(ob->priv.fd, ob->priv.crtc, ob->priv.fb, 0, 0,
&ob->priv.conn, 1, &ob->priv.mode);
}

View File

@ -108,7 +108,7 @@ struct _Outbuf
struct
{
int fd;
unsigned int conn, crtc;
unsigned int conn, crtc, fb;
Buffer buffer[NUM_BUFFERS];
int curr, num;

View File

@ -97,6 +97,8 @@ evas_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h)
return NULL;
}
info->info.output = ob->priv.fb;
ob->priv.num = NUM_BUFFERS;
/* check for buffer override */