20 Jan, 2021

1 commit


06 Jan, 2021

1 commit

  • commit 39aead8373b3c20bb5965c024dfb51a94e526151 upstream.

    So ever since syzbot discovered fbcon, we have solid proof that it's
    full of bugs. And often the solution is to just delete code and remove
    features, e.g. 50145474f6ef ("fbcon: remove soft scrollback code").

    Now the problem is that most modern-ish drivers really only treat
    fbcon as an dumb kernel console until userspace takes over, and Oops
    printer for some emergencies. Looking at drm drivers and the basic
    vesa/efi fbdev drivers shows that only 3 drivers support any kind of
    acceleration:

    - nouveau, seems to be enabled by default
    - omapdrm, when a DMM remapper exists using remapper rewriting for
    y/xpanning
    - gma500, but that is getting deleted now for the GTT remapper trick,
    and the accelerated copyarea never set the FBINFO_HWACCEL_COPYAREA
    flag, so unused (and could be deleted already I think).

    No other driver supportes accelerated fbcon. And fbcon is the only
    user of this accel code (it's not exposed as uapi through ioctls),
    which means we could garbage collect fairly enormous amounts of code
    if we kill this.

    Plus because syzbot only runs on virtual hardware, and none of the
    drivers for that have acceleration, we'd remove a huge gap in testing.
    And there's no other even remotely comprehensive testing aside from
    syzbot.

    This patch here just disables the acceleration code by always
    redrawing when scrolling. The plan is that once this has been merged
    for well over a year in released kernels, we can start to go around
    and delete a lot of code.

    v2:
    - Drop a few more unused local variables, somehow I missed the
    compiler warnings (Sam)
    - Fix typo in comment (Jiri)
    - add a todo entry for the cleanup (Thomas)

    v3: Remove more unused variables (0day)

    Reviewed-by: Tomi Valkeinen
    Reviewed-by: Thomas Zimmermann
    Reviewed-by: Greg Kroah-Hartman
    Acked-by: Sam Ravnborg
    Cc: Jiri Slaby
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Greg Kroah-Hartman
    Cc: Linus Torvalds
    Cc: Ben Skeggs
    Cc: nouveau@lists.freedesktop.org
    Cc: Tomi Valkeinen
    Cc: Daniel Vetter
    Cc: Jiri Slaby
    Cc: "Gustavo A. R. Silva"
    Cc: Tetsuo Handa
    Cc: Peilin Ye
    Cc: George Kennedy
    Cc: Nathan Chancellor
    Cc: Peter Rosin
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20201029132229.4068359-1-daniel.vetter@ffwll.ch
    Signed-off-by: Greg Kroah-Hartman

    Daniel Vetter
     

04 Jan, 2021

1 commit

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     

30 Dec, 2020

1 commit

  • [ Upstream commit ba236455ee750270f33998df57f982433cea4d8e ]

    If devm_kzalloc() failed after the first time, atmel_lcdfb_of_init()
    can't return -ENOMEM, fix this by putting the error code in loop.

    Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport")
    Reported-by: Hulk Robot
    Signed-off-by: Yang Yingliang
    Signed-off-by: Thomas Zimmermann
    Link: https://patchwork.freedesktop.org/patch/msgid/20201117061350.3453742-1-yangyingliang@huawei.com
    Signed-off-by: Sasha Levin

    Yang Yingliang
     

18 Dec, 2020

2 commits

  • * display/next: (467 commits)
    MMFMWK-8917-2: drm/imx/dcss: add extra plane check
    MMFMWK-8917-1: drm/imx/dcss: remove unnecessary warning
    LF-3024: drm/imx/dcss: allow primary plane to be less than crtc size
    MLK-24081-06: drm: bridge: imx: Add opcode for hdmi rx driver
    MLK-24081-03: drm: bridge: cdns-cec: support hdmi rx cec
    ...

    BJ DevOps Team
     
  • * origin/display/fbdev: (40 commits)
    LF-2723-2 video: epdc: fix kernel dump issue
    LF-2723-1 video: epdc_v2: fix kernel dump issue
    LF-2658 video: fbdev: mxc: Forward ipuv3 LCD external port(mxc_lcdif) driver from imx_4.19.y kernel
    LF-2225-3 fbdev: mxc_ipuv3_fb: drop the using of FBINFO_MISC_USEREVENT
    LF-2225-2 fbdev: mxc_hdmi: drop the using of FBINFO_MISC_USEREVENT
    ...

    BJ DevOps Team
     

14 Dec, 2020

34 commits

  • if use fb_deferred_io, need call fb_deferred_io_init(). otherwise cause kernel dump.

    root@imx6qpdlsolox:~# /unit_tests/Display/mxc_epdc_fb_test.out
    ...
    [ 64.668849] 8] lr : [] psr: 800d0013
    [ 64.750873] sp : 83e09e98 ip : 00000000 fp : 83e09ef0
    [ 64.756106] r10: 863574e0 r9 : 83e09fb0 r8 : 81750a68
    [ 64.761339] r7 : 81750a64 r6 : 820b4000 r5 : 81750ab4 r4 : abc9b400
    [ 64.767874] r3 : fffffffc r2 : 00000000 r1 : 00000001 r0 : 00000000
    [ 64.774411] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    [ 64.781554] Control: 10c5387d Table: 13db004a DAC: 00000051
    [ 64.787311] Process mxc_epdc_fb_tes (pid: 682, stack limit = 0x510f6aba)
    [ 64.794021] Stack: (0x83e09e98 to 0x83e0a000)
    [ 64.798388] 9e80: 83e09ef0 83e08000
    [ 64.806579] 9ea0: 00000255 abc9b400 00000040 802946a0 00000255 83e08000 76bf6000 00000001
    [ 64.814769] 9ec0: 00000040 80299f48 83f9ee00 00000000 00000000 8614f500 00000000 0000000d
    [ 64.822958] 9ee0: 022d7190 83e08000 83e09f78 806f69bc 863574e0 00000003 00100cca 00000000
    [ 64.831148] 9f00: 76bf6000 83db1da8 83db1da8 00000000 00000000 abc9b400 00000000 00000000
    [ 64.839337] 9f20: ab737acc 482f861d 00000001 83e09fb0 76bf6000 00000805 8629d900 863574e0
    [ 64.847526] 9f40: 00000800 00000255 8629d964 801156a4 00000000 482f861d 8614f500 8614f500
    [ 64.855716] 9f60: 83e08000 00000805 76bf6000 83e09fb0 8160f530 10c5387d 00000018 00495b04
    [ 64.863905] 9f80: 00495b04 801159f4 006d0438 76e47f00 80100e78 ffffffff 76e47f00 200f0010
    [ 64.872095] 9fa0: ffffffff 10c5387d 10c5387d 80100e80 76bf6000 ffffffff 000ea5f8 76bf6000
    [ 64.880284] 9fc0: 00000000 006d0438 4048462e 7ea9aa5c 00000024 00000018 00495b04 00495b04
    [ 64.888473] 9fe0: ffffffff 7ea9aa40 00492c75 76e47f00 200f0010 ffffffff 00000000 00000000
    [ 64.896675] [] (fb_deferred_io_mkwrite) from [] (do_page_mkwrite+0x4c/0xd4)
    [ 64.905393] [] (do_page_mkwrite) from [] (handle_mm_fault+0x8d4/0x10a0)
    [ 64.913762] [] (handle_mm_fault) from [] (do_page_fault+0x110/0x2b0)
    [ 64.921869] [] (do_page_fault) from [] (do_DataAbort+0x3c/0xbc)
    [ 64.929541] [] (do_DataAbort) from [] (__dabt_usr+0x40/0x60)
    [ 64.936945] Exception stack(0x83e09fb0 to 0x83e09ff8)
    [ 64.942007] 9fa0: 76bf6000 ffffffff 000ea5f8 76bf6000
    [ 64.950197] 9fc0: 00000000 006d0438 4048462e 7ea9aa5c 00000024 00000018 00495b04 00495b04
    [ 64.958386] 9fe0: ffffffff 7ea9aa40 00492c75 76e47f00 200f0010 ffffffff
    [ 64.965014] Code: 0a000024 e1540003 0a00000a e5940010 (e5931010)
    [ 64.971284] ---[ end trace 4749ff4ebd45f0e6 ]---
    Segmentation fault

    Verified on MX6DL SDB.

    Signed-off-by: Robby Cai
    Reviewed-by: Fancy Fang

    Robby Cai
     
  • if use fb_deferred_io, need call fb_deferred_io_init(). otherwise cause kernel dump.

    root@imx6sllevk:~# /unit_tests/Display/mxc_epdc_v2_fb_test.out
    ...
    [ 88.934049] 8] lr : [] psr: 800e0013
    [ 88.996995] sp : 87641e98 ip : 00000000 fp : 87641ef0
    [ 89.002228] r10: 873c55a0 r9 : 87641fb0 r8 : 81750d58
    [ 89.007460] r7 : 81750d54 r6 : 8680a000 r5 : 81750da4 r4 : dbad9400
    [ 89.013994] r3 : fffffffc r2 : 00000000 r1 : 00000001 r0 : 00000000
    [ 89.020532] Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    [ 89.027677] Control: 10c5787d Table: 87714059 DAC: 00000051
    [ 89.033433] Process mxc_epdc_v2_fb_ (pid: 519, stack limit = 0x7589a195)
    [ 89.040144] Stack: (0x87641e98 to 0x87642000)
    [ 89.044511] 1e80: 87641ef0 87640000
    [ 89.052701] 1ea0: 00000255 dbad9400 00000040 802946a0 00000255 87640000 76b25000 00000001
    [ 89.060891] 1ec0: 00000040 80299f48 870c8600 00000000 00000000 87467140 00000000 0000000d
    [ 89.069081] 1ee0: 03a9f190 87640000 87641f78 806f69bc 873c55a0 00000003 00100cca 00000000
    [ 89.077269] 1f00: 76b25000 87715da8 87715da8 00000000 00000000 dbad9400 00000000 00000000
    [ 89.085458] 1f20: dbecc004 736c09cc 00000001 87641fb0 76b25000 00000805 8756f680 873c55a0
    [ 89.093647] 1f40: 00000800 00000255 8756f6e4 801156a4 00000000 736c09cc 87467140 87467140
    [ 89.101837] 1f60: 87640000 00000805 76b25000 87641fb0 8160f530 10c5387d 004260b8 004260b8
    [ 89.110026] 1f80: 00000000 801159f4 0043700c 76e82f00 80100e78 ffffffff 76e82f00 200f0010
    [ 89.118216] 1fa0: ffffffff 10c5787d 10c5387d 80100e80 76b25000 ffffffff 0017aff8 76b25000
    [ 89.126405] 1fc0: 00000024 01e10444 4048462e 7ebeeaf4 00000001 004260b8 004260b8 00000000
    [ 89.134594] 1fe0: ffffffff 7ebeead8 00424389 76e82f00 200f0010 ffffffff 00000000 00000000
    [ 89.142798] [] (fb_deferred_io_mkwrite) from [] (do_page_mkwrite+0x4c/0xd4)
    [ 89.151517] [] (do_page_mkwrite) from [] (handle_mm_fault+0x8d4/0x10a0)
    [ 89.159887] [] (handle_mm_fault) from [] (do_page_fault+0x110/0x2b0)
    [ 89.167994] [] (do_page_fault) from [] (do_DataAbort+0x3c/0xbc)
    [ 89.175666] [] (do_DataAbort) from [] (__dabt_usr+0x40/0x60)
    [ 89.183069] Exception stack(0x87641fb0 to 0x87641ff8)
    [ 89.188132] 1fa0: 76b25000 ffffffff 0017aff8 76b25000
    [ 89.196321] 1fc0: 00000024 01e10444 4048462e 7ebeeaf4 00000001 004260b8 004260b8 00000000
    [ 89.204510] 1fe0: ffffffff 7ebeead8 00424389 76e82f00 200f0010 ffffffff
    [ 89.211137] Code: 0a000024 e1540003 0a00000a e5940010 (e5931010)
    [ 89.232612] ---[ end trace 111d12b6b7aee084 ]---
    Segmentation fault

    Verified on MX7D SDB, MX6SLL EVK.

    Signed-off-by: Robby Cai
    Reviewed-by: Fancy Fang

    Robby Cai
     
  • This patch forwards ipuv3 LCD external port(mxc_lcdif) driver from
    imx_4.19.y kernel.

    Reviewed-by: Robby Cai
    Signed-off-by: Liu Ying

    Liu Ying
     
  • To cope with upstream API change:
    d88ca7e1a27e ("fbmem: pull fbcon_update_vcs() out of fb_set_var()")

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • To cope with upstream API change:
    d88ca7e1a27e ("fbmem: pull fbcon_update_vcs() out of fb_set_var()")

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • To cope with upstream API change:
    d88ca7e1a27e ("fbmem: pull fbcon_update_vcs() out of fb_set_var()")

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • 67b06ba0 ("PM: QoS: Drop PM_QOS_CPU_DMA_LATENCY and rename related functions")
    changed the pm_qos_*() APIs.
    Updated the IMX usage of them to the new APIs.

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • API changed since:
    2c2f00ab1641 ("i2c: remove i2c_new_dummy() API")

    ../drivers/video/fbdev/mxc/adv7535.c: In function ‘adv7535_probe’:
    ../drivers/video/fbdev/mxc/adv7535.c:299:22: error: implicit declaration of function ‘i2c_new_dummy’ [-Werror=implicit-function-declaration]
    299 | info->i2c_dsi_cec = i2c_new_dummy(client->adapter, addr >> 1);
    | ^~~~~~~~~~~~~
    ../drivers/video/fbdev/mxc/adv7535.c:299:20: warning: assignment to ‘struct i2c_client *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    299 | info->i2c_dsi_cec = i2c_new_dummy(client->adapter, addr >> 1);

    Signed-off-by: Dong Aisheng

    Dong Aisheng
     
  • Since using power domains to handle the mipi phy power
    management in gpcv2 driver for mipi phy domain, remove
    the legacy unncessary regulator related code for mipi
    phy.

    Signed-off-by: Fancy Fang
    Reviewed-by: Robby Cai
    (cherry picked from commit c02e642c3da891d918a27760829346dd083b7bd7)

    Fancy Fang
     
  • sii902x hdmi cable detect thread is trigged by
    event FB_EVENT_FB_REGISTERED in register_framebuffer function
    when device bootup.

    when CONFIG_FB_MXC_OVERLAY is enabled, pixel clock has
    chance to be disabled by overlay fb.
    In this case cable detect thread will fail to get cable state
    and sii902x hdmi will not initialized.

    Fix it with immediate execute the cable detect thread and
    add 20ms delay to wait cable detect thread get the cable state.

    Signed-off-by: Sandor Yu
    Reviewed-by: Robby Cai

    Sandor Yu
     
  • Fix the followed build warning.

    drivers/video/fbdev/mxc/mxc_hdmi.c: In function ‘mxc_hdmi_cable_connected’:
    drivers/video/fbdev/mxc/mxc_hdmi.c:1964:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
       mxc_hdmi_default_edid_cfg(hdmi);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/video/fbdev/mxc/mxc_hdmi.c:1966:2: note: here
      case HDMI_EDID_NO_MODES:
      ^~~~

    Signed-off-by: Sandor Yu
    Reviewed-by: Robby Cai

    Sandor Yu
     
  • fix following build warning:
    ../drivers/video/fbdev/mxc/mxc_hdmi.c: In function 'mxc_hdmi_cable_connected':
    ../drivers/video/fbdev/mxc/mxc_hdmi.c:1964:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
    mxc_hdmi_default_edid_cfg(hdmi);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../drivers/video/fbdev/mxc/mxc_hdmi.c:1966:2: note: here
    case HDMI_EDID_NO_MODES:
    ^~~~

    Signed-off-by: Robby Cai
    Reviewed-by: Sandor Yu

    Robby Cai
     
  • Since the commit

    commit 212836a9929f0c91214a8a1879e6e41be0e26a6f
    Author: Christoph Hellwig
    Date: Fri Jul 26 08:58:36 2019 +0200

    dma-mapping: remove dma_{alloc,free,mmap}_writecombine

    has removed dma_alloc_writecombine interface, below build
    error occured:

    drivers/video/fbdev/mxsfb.c: In function ‘mxsfb_overlay_map_video_memory’:
    drivers/video/fbdev/mxsfb.c:2059:19: error: implicit declaration of function ‘dma_alloc_writecombine’; did you mean ‘pgprot_writecombine’? [-Werror=implicit-function-declaration]
    2059 | ofb->video_mem = dma_alloc_writecombine(ofb->dev,
    | ^~~~~~~~~~~~~~~~~~~~~~
    | pgprot_writecombine
    drivers/video/fbdev/mxsfb.c:2059:17: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    2059 | ofb->video_mem = dma_alloc_writecombine(ofb->dev,
    | ^
    drivers/video/fbdev/mxsfb.c: In function ‘mxsfb_overlay_exit’:
    drivers/video/fbdev/mxsfb.c:2134:4: error: implicit declaration of function ‘dma_free_writecombine’; did you mean ‘pgprot_writecombine’? [-Werror=implicit-function-declaration]
    2134 | dma_free_writecombine(ofb->dev, ofb->video_mem_size,
    | ^~~~~~~~~~~~~~~~~~~~~
    | pgprot_writecombine

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Since the commit

    commit cf4a3ae4ef3399179166a464af1d6b172225bef4
    Author: Daniel Vetter
    Date: Tue May 28 11:02:47 2019 +0200

    fbdev: lock_fb_info cannot fail

    has changed the lock_fb_info() to void type, so cannot check its
    return value anymore.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • When we do set-par for background framebuffer without on-the-fly
    flag being set, we should also unset the enabled overlay framebuffer's
    on-the-fly flag, otherwise the overlay framebuffer cannot be enabled
    again properly because a full mode set procedure is needed for overlay
    framebuffer as it experiences a period of time when background
    framebuffer stops fetching frames.

    Signed-off-by: Liu Ying

    Liu Ying
     
  • Signed-off-by: Leonard Crestez

    Leonard Crestez
     
  • HDCP function could work in other TVs
    but it failed with Sony TV when run hdcp enable/disable stress test.
    The TMDS clock is not detected by Sony TV.
    The TV seems time sensitive for HDMI TMDS.
    Add 20ms delay before TMDS enable make it work.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • This patch forwards imx6 dcic driver from imx_4.19.y kernel.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Add imx6 hdmi framebuffer driver.
    This patch forwards imx6 HDMI framebuffer driver from imx_4.19.y kernel.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • Add sii902x hdmi driver source code.
    This patch forwards sii902x framebuffer driver from imx_4.19.y kernel.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • FB events FB_EVENT_SUSPEND/FB_EVENT_RESUME
    are remove in the kernel patch

    commit 50c5056356340c8b5be90440d2f32fec8c47a7c3
    Author: Daniel Vetter
    Date: Tue May 28 11:02:52 2019 +0200

    fbdev: directly call fbcon_suspended/resume

    Add these events back to support mxc hdmi fb driver.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • fb event FB_EVENT_FB_REGISTERED and FB_EVENT_FB_UNREGISTERED
    are removed by kernel patch

    commit 97b67986f1451c772b488d597310f95c14547cce
    Author: Daniel Vetter
    Date: Tue May 28 11:02:41 2019 +0200
    fbcon: call fbcon_fb_(un)registered directly

    Add these two events back to support
    mxc hdmi and sii90x hdmi fb driver.

    Signed-off-by: Sandor Yu

    Sandor Yu
     
  • mxc_epdc_fb.c for i.MX6DL, i.MX6SL
    mxc_epdc_v2_fb.c for i.MX7D, i.MX6ULL, i.MX6SLL.

    Signed-off-by: Robby Cai

    Robby Cai
     
  • This patch forwards LDB driver from imx_4.19.y kernel.

    Signed-off-by: Liu Ying

    Liu Ying
     
  • This patch forwards IPUv3 framebuffer driver from imx_4.19.y kernel.

    [ Liu Ying: Fixed a minor build warning ]
    Signed-off-by: Liu Ying

    Liu Ying
     
  • Add driver support for HX8369 mipi panel display.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add the framebuffer driver support for the NXP MIPI
    DSI controller.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add the framebuffer driver support for the Samsung
    MIPI DSI controller.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add driver support for RM68191 mipi panel display.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add driver support for RM68200 mipi panel display.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add driver support for Truly HX8363 mipi panel.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add driver support for ADI ADV7535 module which can convert
    MIPI DSI signals to HDMI signals.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add the framebuffer driver support for the Northwest Logic
    MIPI DSI controller.

    Signed-off-by: Fancy Fang

    Fancy Fang
     
  • Add framebuffer driver for i.MX LCDIF display controller
    which appears on quite a lot of i.MX platforms.

    Signed-off-by: Fancy Fang

    Fancy Fang