sun60iw2: expose logo scanout diagnostics
This commit is contained in:
parent
361f84346d
commit
d45530ae0d
@ -1399,7 +1399,7 @@
|
||||
uhdmi_fast_output = <0>;
|
||||
uhdmi_resistor_select = <1>;
|
||||
force-output = <1>;
|
||||
force-output-timing = "148500-1920-2008-2052-2200-1080-1084-1089-1125";
|
||||
force-output-timing = "148500-1920-2008-2052-2200-1080-1084-1089-1125-5";
|
||||
snps_phy = <
|
||||
25000 185625 0x0007 0x8160 0x8188
|
||||
185625 185625 0x0007 0x8160 0x8198
|
||||
|
||||
@ -1060,6 +1060,9 @@ static int display_set_plane(struct display_state *state)
|
||||
DRM_ERROR("Failed to set plane %d fb %d on crtc %d: %d\n",
|
||||
plane_req.plane_id, plane_req.fb_id,
|
||||
plane_req.crtc_id, ret);
|
||||
else
|
||||
printf("armbian logo: set plane %d fb %d on crtc %d\n",
|
||||
plane_req.plane_id, plane_req.fb_id, plane_req.crtc_id);
|
||||
|
||||
return ret;
|
||||
|
||||
@ -1466,17 +1469,21 @@ static int display_logo(struct display_state *state)
|
||||
if (fb->height > bmp->header.height)
|
||||
upper_offset = ((fb->height - bmp->header.height) >> 1);
|
||||
|
||||
DRM_INFO("logo: fb %dx%d fmt %c%c%c%c addr 0x%lx size %u, bmp %ux%u bpp %u offset %d,%d\n",
|
||||
fb->width, fb->height,
|
||||
fb->format->format & 0xff,
|
||||
(fb->format->format >> 8) & 0xff,
|
||||
(fb->format->format >> 16) & 0xff,
|
||||
(fb->format->format >> 24) & 0xff,
|
||||
(ulong)fb->dma_addr, fb->buf_size,
|
||||
bmp->header.width, bmp->header.height,
|
||||
bmp->header.bit_count, left_offset, upper_offset);
|
||||
printf("armbian logo: fb %dx%d fmt %c%c%c%c addr 0x%lx size %u, bmp %ux%u bpp %u offset %d,%d\n",
|
||||
fb->width, fb->height,
|
||||
fb->format->format & 0xff,
|
||||
(fb->format->format >> 8) & 0xff,
|
||||
(fb->format->format >> 16) & 0xff,
|
||||
(fb->format->format >> 24) & 0xff,
|
||||
(ulong)fb->dma_addr, fb->buf_size,
|
||||
bmp->header.width, bmp->header.height,
|
||||
bmp->header.bit_count, left_offset, upper_offset);
|
||||
|
||||
bmp_display((ulong)state->logo->file_addr, left_offset, upper_offset);
|
||||
ret = bmp_display((ulong)state->logo->file_addr, left_offset, upper_offset);
|
||||
if (ret) {
|
||||
DRM_ERROR("bmp_display failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
flush_dcache_range((ulong)fb->dma_addr,
|
||||
ALIGN((ulong)(fb->dma_addr + fb->buf_size),
|
||||
CONFIG_SYS_CACHELINE_SIZE));
|
||||
@ -1487,6 +1494,8 @@ static int display_logo(struct display_state *state)
|
||||
return ret;
|
||||
}
|
||||
|
||||
printf("armbian logo: display enabled\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -1023,7 +1023,7 @@ int __sunxi_hdmi_init_dts(struct sunxi_drm_hdmi *hdmi)
|
||||
const char *dts_timming = NULL;
|
||||
char *p = NULL, *end = NULL;
|
||||
struct drm_display_mode *timming = drm_mode_create();
|
||||
unsigned long val[9];
|
||||
unsigned long val[10];
|
||||
|
||||
hdmi->hdmi_core.reg_base = (uintptr_t)dev_read_addr(dev);
|
||||
if (hdmi->hdmi_core.reg_base <= 0) {
|
||||
@ -1052,7 +1052,7 @@ int __sunxi_hdmi_init_dts(struct sunxi_drm_hdmi *hdmi)
|
||||
if (!IS_ERR_OR_NULL(dts_timming)) {
|
||||
p = (char *)dts_timming;
|
||||
|
||||
while (i < 9 && p) {
|
||||
while (i < 10 && p) {
|
||||
val[i] = simple_strtoul(p, &end, 10);
|
||||
if (end == p)
|
||||
break;
|
||||
@ -1070,6 +1070,9 @@ int __sunxi_hdmi_init_dts(struct sunxi_drm_hdmi *hdmi)
|
||||
timming->vsync_start = val[6];
|
||||
timming->vsync_end = val[7];
|
||||
timming->vtotal = val[8];
|
||||
timming->flags = i == 10 ?
|
||||
val[9] :
|
||||
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC;
|
||||
timming->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_USERDEF;
|
||||
hdmi->hdmi_ctrl.drv_dts_force_mode = value;
|
||||
hdmi->hdmi_ctrl.drv_dts_mode = timming;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user