mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 16:00:05 +01:00
check drm support dumb buffer capability
This commit is contained in:
parent
6ccd13a2d7
commit
cb65ec6b58
1 changed files with 11 additions and 0 deletions
|
|
@ -1016,6 +1016,17 @@ static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
|
|||
Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
|
||||
{
|
||||
int i, num_dvi = 0, num_hdmi = 0;
|
||||
int ret;
|
||||
|
||||
/* check for dumb capability */
|
||||
{
|
||||
uint64_t value = 0;
|
||||
ret = drmGetCap(drmmode->fd, DRM_CAP_DUMB_BUFFER, &value);
|
||||
if (ret > 0 || value != 1) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "KMS doesn't support dumb interface\n");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue