Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Resolution Settings not remembered after reboot

254

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
254

Resolution Settings not remembered after reboot

Posted at 8/22/2016 14:42:25      View:5828 | Replies:6        Print      Only Author   [Copy Link] 1#
Hi

Resolution Settings not remembered after reboot

I thought is was only a problem with 4K tv's but it looks like it is a problem with all tv's and resolutions.

I think the problem is with the new uboot v2.30

When I set resolution to 1280x720 and restart, it is set to 1920x1080 again with Firefly sources.
I found another RK3288 firmware and flashed it's bootloader v2.30 and after every restart the resolution is set to 1280x720 if I set it to 1920x1080.
So I think there is something in the uboot code forcing a certain resolution or a file in system that works together with uboot.

I hope someone will be able to find the problem and fix it.

I will try later with the old bootloader v2.19 and also test, but there was lots of video improvements in the new uboot so I don't want to loose it.

Thanks
Reply

Use props Report

254

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
254
Posted at 12/4/2016 14:27:20        Only Author  2#
Last edited by mo123 In 12/4/2016 14:47 Editor

I just tried with the latest Firefly RK3288 20151125 branch and still have this problem.
The resolution is not remembered after a reboot and defaults to 720p, 1280x720 resolution and not the 1080p you set it at before rebooting. It worked fine in old KitKat firmware but doesn't work in Lollipop.
Maybe syncing to latest RK code will fix this problem?
This is an urgent bug to fix.

Any solution for this problem and will the fix be included in the FireNow Bitbucket code?

---------------------------------------------------------------------------------------------------------------------------------

Why such rude code in this file, L3628
FireNow/kernel/drivers/video/rockchip/rk_fb.c
In other LP SDK I have, it is updated and says - "pr_err("should not be here--%s\n", __func__);"
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 12/5/2016 10:09:03        Only Author  3#
hi  mo123
   where did you get this"the latest  Firefly RK3288 20151125 branch"?
the date of  "20151125" seems not to be newest enough.
Reply

Use props Report

254

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
254
Posted at 12/5/2016 11:10:53        Only Author  4#
Last edited by mo123 In 12/5/2016 11:12 Editor
isle Posted at 12/5/2016 10:09
hi  mo123
   where did you get this"the latest  Firefly RK3288 20151125 branch"?
the date of  "201 ...

I found it here
https://bitbucket.org/T-Firefly/ ... oid5.1_201611251533

I merged this tag into my main master branch that was updated to latest 20161028 code that contain this last commit
Android->framework:fix btn default color

git fetch --all --tags --prune
git checkout tags/Firefly-RK3288_Android5.1_201611251533

The resolution defaults to 720p after every boot.

I also applied this patch to enable 4K and disable dual-display.

Firefly-RK3288 5.1 SDK default support dual-screen display, but does not support 4K HDMI display, if you need 4K when how to do it, open the VOP (ie LCDC0), turn off RGB2HDMI line.

To do this, disable LCDC1 in the form of arch / arm / boot / dts / firefly-rk3288.dts (reload: arch / arm / boot / dts / firefly-rk3288-reload.dts). Make sure LCDC0 is ON and PRMRY, as follows:
index 59f363e..eccf5b1 100644
--- a/kernel/arch/arm/boot/dts/firefly-rk3288-reload.dts
+++ b/kernel/arch/arm/boot/dts/firefly-rk3288-reload.dts
@@ -187,7 +187,7 @@
         hpd-gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
                rockchip,source = <0>; //0: LCDC0; 1: LCDC1
                rockchip,prop = <PRMRY>;//<PRMRY>;//<EXTEND>
-               status = "okay";
+               status = "disabled";
     };
};

@@ -577,7 +577,7 @@
};

&lcdc1 {
-       status = "okay";
+       status = "disabled";
        rockchip,iommu-enabled = <1>;
        rockchip,prop = <EXTEND>;
};
@@ -587,6 +587,7 @@
        rockchip,cec_enable = <0>;
        rockchip,hdcp_enable = <0>;
        rockchip,hdmi_audio_source = <1>;
+       rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC0>;
};

In kernel fie rockchip-hdmi.h I have this

#define HDMI_DEFAULT_SCALE                95
#define HDMI_AUTO_CONFIG                false

/* HDMI default vide mode */
#define HDMI_VIDEO_DEFAULT_MODE                        HDMI_1280X720P_60HZ
                                                /*HDMI_1920X1080P_60HZ*/
#define HDMI_VIDEO_DEFAULT_COLORMODE                HDMI_COLOR_AUTO
#define HDMI_VIDEO_DEFAULT_COLORDEPTH                8

If I change #define HDMI_AUTO_CONFIG                false  to true then after every boot the resolution defaults to 1080p or 4K on a 4K tv and don't remember the 720p setting I set before reboot.
So this also doesn't work.
The resolution you set isn't saved to a file and reloaded after reboot correctly.

On other RK RK3229/RK3368 Lollipop firmwares(more updated SDK's with newer HDMI drivers than used in Firefly SDK) it doesn't have this problem, only on Firefly RK3288 SDK and firmwares this problem exists.

Please help.
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 12/5/2016 15:10:36        Only Author  5#
Hi mo123
  the system save the display config in this file  :   /cache/display.cfg
so ,check it out  when you change the resolution .
and the  source code is here : sdk/system/displayd/DisplayManager.cpp
Reply

Use props Report

254

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
254
Posted at 12/7/2016 03:31:45        Only Author  6#
isle Posted at 12/5/2016 15:10
Hi mo123
  the system save the display config in this file  :   /cache/display.cfg
so ,check it ou ...

I decided to change
In kernel fie rockchip-hdmi.h
#define HDMI_AUTO_CONFIG               true               
instead of false

I had to root to be able to see /cache/display.cfg file

On booting it show this now in /cache/display.cfg file

display=0,iface=4,enable=1,mode=1920x1080p-60,colormode=0
display=0,iface=1,enable=0,mode=720x576i-50,colormode=0,colormode=0,colormode=0,colormode=0,colormode=0

And in Android Settings - Display it shows 1920x1080x60

After changing Android Display Settings to 720p@60hz file shows

display=0,iface=4,enable=1,mode=1280x720p-60,colormode=0
display=0,iface=1,enable=0,mode=720x576i-50,colormode=0,colormode=0,colormode=0,colormode=0

After rebooting /cache/display.cfg file still shows the same
display=0,iface=4,enable=1,mode=1280x720p-60,colormode=0
display=0,iface=1,enable=0,mode=720x576i-50,colormode=0,colormode=0,colormode=0,colormode=0
But if I go into Android Display Settings HDMI, it shows 1920x1080x60 as the default selected and highlighted resolution which is not the same as in the /cache/display.cfg
So there is a mismatch.
When booting there must be something that overwrites the resolution maybe from uboot, kernel or system to use a different resolution.

The /cache/display.cfg file has the following permissions on my system
owner - root
group - root
permissions - 600 rw
so root user has rw permission and other users none
Is this perhaps the problem?

Or can this commit maybe interfere or something else?
https://bitbucket.org/T-Firefly/ ... 8ebf203dc17a91c60ae

So if a user has a 4K tv he can't use 720p resolution after reboot while another user with a 4K tv uses 1080p can't use it after a reboot since resolution will default to 4K, the highest one instead.
Reply

Use props Report

1821

Credits

10

Prestige

17

Contribution

super moderator

Rank: 8Rank: 8

Credits
1821
Posted at 12/7/2016 10:35:32        Only Author  7#
Hi mo123
   I have tested our Lollipop firmware and the is no such problem, so you maybe checkout you source code to see why after rebooting,the system didn't read the /cache/display.cfg file and set the resolution.
the uboot and kenerl can set HDMI display ,but can't modify the /cache/display.cfg file. and  your cfg file is right, so there must be something wrong in your source code in display system. check from sdk/system/displayd/DisplayManager.cpp
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list