Commit febafa2b authored by Siarhei Siamashka's avatar Siarhei Siamashka
Browse files

Don't initialize XV if we can't reserve a scalable sunxi-disp layer



In the case if an attempt to reserve a scalable sunxi-disp layer
failed, don't initialize XV at all. Otherwise any attempt to use
XV overlay is not going to work correctly and just results in
the following dmesg spam:

[  728.280000] [DISP] not supported yuv channel format:18 in img_sw_para_to_reg

This may happen on Allwinner A13 if scaler mode is enabled in
.fex file (A13 only has one DEFE scaler). Allwinner A10 also
can have similar troubles in dual-head configuration if scaler
mode is enabled for one or both screens (A10 has two DEFE scalers).
Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
parent 15a30609
......@@ -273,9 +273,16 @@ static XF86AttributeRec Attributes[] =
SunxiVideo *SunxiVideo_Init(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
sunxi_disp_t *disp = SUNXI_DISP(pScrn);
SunxiVideo *self;
XF86VideoAdaptorPtr adapt;
if (!disp || !disp->layer_has_scaler) {
xf86DrvMsg(pScreen->myNum, X_INFO,
"SunxiVideo_Init: no scalable layer available for XV\n");
return NULL;
}
if (!(self = calloc(1, sizeof(SunxiVideo)))) {
xf86DrvMsg(pScreen->myNum, X_INFO, "SunxiVideo_Init: calloc failed\n");
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment