drm: combine meson fbdev callback with default setcmap [1/1]

PD#SH-17079

Problem:
after logo no console display on screen

Solution:
combine meson callback with default setcmap

Verify:
s4

Test:
DRM-OSD-125

Change-Id: I2c3bf295090b45b81d0a8a8bda021b9a5f683eba
Signed-off-by: mingyang.he <mingyang.he@amlogic.com>
This commit is contained in:
mingyang.he
2023-11-09 12:30:43 +00:00
committed by Luan Yuan
parent 98d8716355
commit e280e1df71
+13 -8
View File
@@ -177,14 +177,19 @@ static int am_meson_drm_fbdev_setcmap(struct fb_cmap *cmap, struct fb_info *info
index = cmap->start;
DRM_DEBUG("%s\n", __func__);
for (count = 0; count < cmap->len; count++) {
if (transp)
trans = *transp++;
if (info->fbops->fb_setcolreg)
r = info->fbops->fb_setcolreg(index++, *red++, *green++, *blue++, trans,
info);
if (r != 0)
return r;
if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) {
for (count = 0; count < cmap->len; count++) {
if (transp)
trans = *transp++;
if (info->fbops->fb_setcolreg)
r = info->fbops->fb_setcolreg(index++, *red++, *green++, *blue++,
trans, info);
if (r != 0)
return r;
}
} else {
r = drm_fb_helper_setcmap(cmap, info);
return r;
}
return 0;