forked from enlightenment/efl
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:
parent
18c40befc0
commit
3ec7c4b517
|
@ -469,7 +469,6 @@ evas_drm_outbuf_setup(Outbuf *ob)
|
||||||
drmModePlaneResPtr pres;
|
drmModePlaneResPtr pres;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
uint64_t dumb;
|
uint64_t dumb;
|
||||||
unsigned int fb;
|
|
||||||
|
|
||||||
/* check for valid Output buffer */
|
/* check for valid Output buffer */
|
||||||
if ((!ob) || (ob->priv.fd < 0)) return EINA_FALSE;
|
if ((!ob) || (ob->priv.fd < 0)) return EINA_FALSE;
|
||||||
|
@ -539,7 +538,7 @@ evas_drm_outbuf_setup(Outbuf *ob)
|
||||||
ob->priv.crtc = crtc;
|
ob->priv.crtc = crtc;
|
||||||
|
|
||||||
/* get the current framebuffer */
|
/* 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 */
|
/* spew out connector properties for testing */
|
||||||
/* drmModePropertyPtr props; */
|
/* drmModePropertyPtr props; */
|
||||||
|
@ -576,7 +575,7 @@ evas_drm_outbuf_setup(Outbuf *ob)
|
||||||
(ob->priv.mode.vdisplay != conn->modes[0].vdisplay))
|
(ob->priv.mode.vdisplay != conn->modes[0].vdisplay))
|
||||||
{
|
{
|
||||||
/* set new crtc mode */
|
/* 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);
|
&ob->priv.conn, 1, &ob->priv.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ struct _Outbuf
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
unsigned int conn, crtc;
|
unsigned int conn, crtc, fb;
|
||||||
|
|
||||||
Buffer buffer[NUM_BUFFERS];
|
Buffer buffer[NUM_BUFFERS];
|
||||||
int curr, num;
|
int curr, num;
|
||||||
|
|
|
@ -97,6 +97,8 @@ evas_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info->info.output = ob->priv.fb;
|
||||||
|
|
||||||
ob->priv.num = NUM_BUFFERS;
|
ob->priv.num = NUM_BUFFERS;
|
||||||
|
|
||||||
/* check for buffer override */
|
/* check for buffer override */
|
||||||
|
|
Loading…
Reference in New Issue