AM3517 Resize function

Hi.
Regarding the Resize function of AM3517,
my customer tried to resize and get the following results.

I would like to know there is any limitation to a small size, or not?

[Evaluation status]
-EVM: TI AM3517EVM
-EZSDK: Linux v5.03.02
-Input image(Fixed): 720x480
-Output image Resize results 

<LCD on EVM>
OK:
186x124
NG:(lack of holizontal image)
400x100
200x100
186x100

<LCD display>
OK:
800x600
400x150
400x600
NG:
400x100(lack of holizontal image)
200x100(No image at all)
186x100(No image at all)
186x124(No image at all) Error log is here. 4834.20120404_resize_error_log.txt

Regards,
Kanae

  • The resize factor is limited to 1/4, basically if you try to set your horizontal resolution below 480/4 (120) it could cause the error. Please refer the TRM for additional details.

  • In reply to Punya Prakash:

    Hi. Thank you for your reply.
    I could understand the NG case in resize: 186x"124" on LCD display.
    It is related by "Functional Clock Frequency Requirement" on TRM: page-1272.

    Regards,
    Kanae

  • In reply to Punya Prakash:

    Dear Punya Prakash,

       I am also facing same problem in am3517evm. Rotation and resize issue. i am able to rotate my display 180 degrees but not 90 or 270 degrees

    with this command   echo "1" > /sys/class/graphics/fb0/rotate. when i try to rotate 90 degrees following is the error on debug port----

    [ 157.027130] max frame size 8388608, line size 480
    [ 157.027130] max frame size 8388608, line size 480
    [ 157.027160] value of r == 0 Memory Region = cda7e884
    [ 157.027191] setup_overlay 0, posx 0, posy 0, outw 320, outh 240
    [ 157.027191] paddr 8e000000, vaddr d1000000
    [ 157.027221] check_overlay 0: (0,0 320x240 -> 320x240) disp (240x320)
    [ 157.027221] R in setup_overlay_info == -22 RotationType = 0 Width = 320 Height = 240
    [ 157.027252] ovl->setup_overlay_info failed
    [ 157.027252] setup_overlay failed
    [ 157.027252] apply_changes failed
    [ 157.027282] detected fb_set_par error, error code: -22

    Thanks in advance,

    Rajeev

  • In reply to Rajeev:

    Hi, Rajeev.
    I am facing a similar issue for AM3517EVM: Rotation and resize issue.
    I have posted here.
    http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/t/180397.aspx

    Could you please add your case?

    Regards,
    Kanae

  • In reply to Kanae:

    Dear Kanae,

            I had posted about Display Rotation and Resize issue in the link  u have posted..

    Regards

    Rajeev.

  • In reply to Rajeev:

    Dear Rajeev,

    Thank you!
    I hope anybody can help us.

    Regards,
    Kanae

  • In reply to Kanae:

    Can you try with the sample application attached here with this post?

    Syntax to run this application is,

    ./saFbdevRotation -d /dev/fb0 -r <0, 90, 180, 270>

    Thanks,

    Vaibhav

  • In reply to Vaibhav Hiremath:

    Hi Vaibhav,

       In a month or so i got first response thanks for that. when i tried to cross compile it showed error linux/omapfb.h no such file or directory

       I had tested your saFbdevRotation application its showing colour stripes in all angles ( 0, 90 180 and 270 degrees)

    all the stripes are same from top while, black, red, green and so on...

    Following is for your reference 

    root@devkit:~# ./saFbdevRotation -d /dev/fb0 90       FOR 90 DEGREE ROTATION
    Fix Screen Info:
    ----------------
    Line Length - 480
    Physical Address = 8f400000
    Buffer Length = 4194304

    Var Screen Info:
    ----------------
    Xres - 240
    Yres - 320
    Xres Virtual - 240
    Yres Virtual - 960
    Bits Per Pixel - 16
    Pixel Clk - 125000
    Rotation - 0
    [  252.418090] max frame size 4194304, line size 480
    [  252.418121] max frame size 4194304, line size 480
    [  252.418151] value of r == 0 Memory Region = cee1c884
    [  252.418151] setup_overlay 0, posx 0, posy 0, outw 240, outh 320
    [  252.418182] paddr 8f400000, vaddr d1000000
    [  252.418182] In Function dss_ovl_set_overlay_info
    [  252.418212] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  252.418212] R in setup_overlay_info == 0 RotationType = 0 Width = 240 Height = 320
    [  252.418243] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  252.418304] offset0 0, offset1 0, row_inc 1, pix_inc 1
    Fix Screen Info:
    ----------------
    Line Length - 480
    Physical Address = 8f400000
    Buffer Length = 4194304

    Var Screen Info:
    ----------------
    Xres - 240
    Yres - 320
    Xres Virtual - 240
    Yres Virtual - 320
    Bits Per Pixel - 16
    Pixel Clk - 125000
    Rotation - 0
    [  257.479431] max frame size 4194304, line size 480
    [  257.479461] max frame size 4194304, line size 480
    [  257.479461] value of r == 0 Memory Region = cee1c884
    [  257.479492] setup_overlay 0, posx 0, posy 0, outw 240, outh 320
    [  257.479522] paddr 8f400000, vaddr d1000000
    [  257.479522] In Function dss_ovl_set_overlay_info
    [  257.479553] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  257.479553] R in setup_overlay_info == 0 RotationType = 0 Width = 240 Height = 320
    [  257.479583] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  257.479614] offset0 0, offset1 0, row_inc 1, pix_inc 1

    root@devkit:~# ./saFbdevRotation -d /dev/fb0 180  FOR 180 Degree ROTATION
    Fix Screen Info:
    ----------------
    Line Length - 480
    Physical Address = 8f400000
    Buffer Length = 4194304

    Var Screen Info:
    ----------------
    Xres - 240
    Yres - 320
    Xres Virtual - 240
    Yres Virtual - 960
    Bits Per Pixel - 16
    Pixel Clk - 125000
    Rotation - 0
    [  983.121917] max frame size 4194304, line size 480
    [  983.121948] max frame size 4194304, line size 480
    [  983.121978] value of r == 0 Memory Region = cee1c884
    [  983.121978] setup_overlay 0, posx 0, posy 0, outw 240, outh 320
    [  983.122009] paddr 8f400000, vaddr d1000000
    [  983.122009] In Function dss_ovl_set_overlay_info
    [  983.122039] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  983.122039] R in setup_overlay_info == 0 RotationType = 0 Width = 240 Height = 320
    [  983.122070] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  983.122131] offset0 0, offset1 0, row_inc 1, pix_inc 1
    Fix Screen Info:
    ----------------
    Line Length - 480
    Physical Address = 8f400000
    Buffer Length = 4194304

    Var Screen Info:
    ----------------
    Xres - 240
    Yres - 320
    Xres Virtual - 240
    Yres Virtual - 320
    Bits Per Pixel - 16
    Pixel Clk - 125000
    Rotation - 0
    [  988.184753] max frame size 4194304, line size 480
    [  988.184783] max frame size 4194304, line size 480
    [  988.184814] value of r == 0 Memory Region = cee1c884
    [  988.184814] setup_overlay 0, posx 0, posy 0, outw 240, outh 320
    [  988.184844] paddr 8f400000, vaddr d1000000
    [  988.184844] In Function dss_ovl_set_overlay_info
    [  988.184875] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  988.184875] R in setup_overlay_info == 0 RotationType = 0 Width = 240 Height = 320
    [  988.184906] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  988.184967] offset0 0, offset1 0, row_inc 1, pix_inc 1

                                                                     

    and my u-boot arguments are as follows 

    video_mode=omapdss.def_disp=lcd omapfb.vram=0:4M,1:4M,2:4M vram=12M tnlcd.tnlcd_data=8000,240,10,50,10,320,4,3,2,18,18

    As you see i had passed 18 BPP and its showing 16 BPP when i run application

    what is the problem pleas go through my other post in following link

    http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/t/180397.aspx#658378

    Thanks vaibhav,

    Rajeev

  • In reply to Rajeev:

    Hi Rajeev,

    Let me try to response all your questions and issues one-by-one,,

    In a month or so i got first response thanks for that. when i tried to cross compile it showed error linux/omapfb.h no such file or directory

    [Vaibhav] I really apologize here, we try to respond as many posts as possible and sometimes due to all known and unknown reasons some posts stay unattended.

    As far as cross-compile issue is concerned, you have to set the kernel include path for building it. Thats the way all application MUST need built.

    all the stripes are same from top while, black, red, green and so on...

    [Vaibhav] This is expected and application draws 8 color bars of different colors on Display.

    root@devkit:~# ./saFbdevRotation -d /dev/fb0 90       FOR 90 DEGREE ROTATION

    [Vaibhav] You have missed to specify "-r" option here before specifying rotation degree. Look at the logs, the rotation doesn't change at all, it always stays at degree 0.

    As you see i had passed 18 BPP and its showing 16 BPP when i run application

    [Vaibhav] I need come more details here, like, /sys/devices/platform/omapdss/display0/timings?

    I believe you are also passing "omapfb.rotate=0 omapfb.vrfb=y" in your bootargs from uboot, right? Also, please refer to the PSP user guide, which actually explains all above information in detail - http://processors.wiki.ti.com/index.php/UserGuideDisplayDrivers_PSP_04.02.00.07

    Thanks,

    Vaibhav

  • In reply to Vaibhav Hiremath:

    Hi Vaibhav,

    Thanks Vaibhav, I had tested saFbdevRotation with -r yes according to application its getting rotated to 90, 180, 270 without any error.

    but why  this "echo "1" > /sys/class/graphics/fb0/rotate" command is getting fb_set_par error -22

    when i execute the application, stripes gets displayed in portrait mode and then changes to landscape mode i.e 90 degree rotation. again back to portrait mode.

    but after exiting the application its coming back to normal position. What i need is when i boot up directly my application should work in landscape mode.

    and other problem is about colour stripes. Below is the image of the display with stripes.

    root@devkit:/home# ./saFbdevRotation -d /dev/fb0 -r 90
    Fix Screen Info:
    ----------------
    Line Length - 480
    Physical Address = 8f400000
    Buffer Length = 4194304

    Var Screen Info:
    ----------------
    Xres - 240
    Yres - 320
    Xres Virtual - 240
    Yres Virtual - 960
    Bits Per Pixel - 16
    Pixel Clk - 125000
    Rotation - 0

    [  686.235626] max frame size 4194304, line size 640
    [  686.235656] max frame size 4194304, line size 640
    [  686.235687] value of r == 0 Memory Region = cee1e884
    [  686.235687] setup_overlay 0, posx 0, posy 0, outw 240, outh 320
    [  686.235717] paddr 8f400000, vaddr d1000000
    [  686.235717] In Function dss_ovl_set_overlay_info
    [  686.235748] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  686.235778] R in setup_overlay_info == 0 RotationType = 0 Width = 240 Height = 320
    [  686.235778] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  686.235839] offset0 152960, offset1 152960, row_inc 152961, pix_inc -641
    Fix Screen Info:
    ----------------
    Line Length - 640
    Physical Address = 8f400000
    Buffer Length = 4194304

    Var Screen Info:
    ----------------
    Xres - 320
    Yres - 240
    Xres Virtual - 320
    Yres Virtual - 240
    Bits Per Pixel - 16
    Pixel Clk - 125000
    Rotation - 90
    [  691.300384] max frame size 4194304, line size 480
    [  691.300415] max frame size 4194304, line size 480
    [  691.300445] value of r == 0 Memory Region = cee1e884
    [  691.300445] setup_overlay 0, posx 0, posy 0, outw 240, outh 320
    [  691.300476] paddr 8f400000, vaddr d1000000
    [  691.300476] In Function dss_ovl_set_overlay_info
    [  691.300506] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  691.300506] R in setup_overlay_info == 0 RotationType = 0 Width = 240 Height = 320
    [  691.300537] check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
    [  691.300598] offset0 0, offset1 0, row_inc 1, pix_inc 1

    As I still get 16 bits per pixel, i think due to this 16bits per pixel i am getting colour stripes issue in my display.

    [Vaibhav] I need come more details here, like, /sys/devices/platform/omapdss/display0/timings?

    root@devkit:/# cat sys/devices/platform/omapdss/display0/timings
    8000,240/10/50/10,320/4/3/2

    root@devkit:/# cat sys/devices/platform/omapdss/display0/name
    lcd
     

    root@devkit:~# fbset

    mode "240x320-78"
        # D: 8.000 MHz, H: 25.806 kHz, V: 78.439 Hz
        geometry 240 320 240 960 16
        timings 125000 50 10 3 4 10 2
        rgba 5/11,6/5,5/0,0/0
    endmode


    I believe you are also passing "omapfb.rotate=0 omapfb.vrfb=y" in your bootargs from uboot, right?
       
    [Rajeev] Actually NO, Bootargs which i passed in u-boot are as follows
                 video_mode=omapdss.def_disp=lcd omapfb.vram=0:4M,1:4M,2:4M vram=12M tnlcd.tnlcd_data=8000,240,10,50,10,320,4,3,2,18,18


     When I passed following u-boot arguments omapfb.rotate=0 (or 1,2,3)
              video_mode=omapdss.def_disp=lcd omapfb.vram=0:4M,1:4M,2:4M vram=12M omapfb.rotate=0 omapfb.vrfb=y tnlcd.tnlcd_data=8000,240,10,50,10,320,4,3,2,18,18
      Display is blank and following are kernel debug messages which displays frame-buffer cannot fit into memory and as in debug physical address has some value where as virtual address is null. I think there lies the problem
        

         In Function dss_ovl_set_overlay_info
          max frame size 4194304, line size 480
         cannot fit FB to memory
         value of r == 0 Memory Region = cee1d884
         setup_overlay 0, posx 0, posy 0, outw 240, outh 320
         paddr 70000000, vaddr   (null)
        In Function dss_ovl_set_overlay_info
        check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
        R in setup_overlay_info == 0 RotationType = 1 Width = 240 Height = 320
        check_overlay 0: (0,0 240x320 -> 240x320) disp (240x320)
        offset0 0, offset1 0, row_inc 3617, pix_inc 1

    As you said i am going through the link you provided. i will test an cases related and inform you.

    Thanks Vaibhav,

    Rajeev.