Skip to content
Snippets Groups Projects
  1. Apr 20, 2021
    • Douglas Anderson's avatar
      drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare · 3235b0f2
      Douglas Anderson authored
      
      Unpreparing and re-preparing a panel can be a really heavy
      operation. Panels datasheets often specify something on the order of
      500ms as the delay you should insert after turning off the panel
      before turning it on again. In addition, turning on a panel can have
      delays on the order of 100ms - 200ms before the panel will assert HPD
      (AKA "panel ready"). The above means that we should avoid turning a
      panel off if we're going to turn it on again shortly.
      
      The above becomes a problem when we want to read the EDID of a
      panel. The way that ordering works is that userspace wants to read the
      EDID of the panel _before_ fully enabling it so that it can set the
      initial mode correctly. However, we can't read the EDID until we power
      it up. This leads to code that does this dance (like
      ps8640_bridge_get_edid()):
      
      1. When userspace requests EDID / the panel modes (through an ioctl),
         we power on the panel just enough to read the EDID and then power
         it off.
      2. Userspace then turns the panel on.
      
      There's likely not much time between step #1 and #2 and so we want to
      avoid powering the panel off and on again between those two steps.
      
      Let's use Runtime PM to help us. We'll move the existing prepare() and
      unprepare() to be runtime resume() and runtime suspend(). Now when we
      want to prepare() or unprepare() we just increment or decrement the
      refcount. We'll default to a 1 second autosuspend delay which seems
      sane given the typical delays we see for panels.
      
      A few notes:
      - It seems the existing unprepare() and prepare() are defined to be
        no-ops if called extra times. We'll preserve that behavior but may
        try to remove it in a future patch.
      - This is a slight change in the ABI of simple panel. If something was
        absolutely relying on the unprepare() to happen instantly that
        simply won't be the case anymore. I'm not aware of anyone relying on
        that behavior, but if there is someone then we'll need to figure out
        how to enable (or disable) this new delayed behavior selectively.
      - In order for this to work we now have a hard dependency on
        "PM". From memory this is a legit thing to assume these days and we
        don't have to find some fallback to keep working if someone wants to
        build their system without "PM".
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210416153909.v4.7.I9e8bd33b49c496745bfac58ea9ab418bd3b6f5ce@changeid
      3235b0f2
  2. Dec 15, 2020
  3. Dec 07, 2020
  4. Nov 17, 2020
  5. Nov 14, 2020
  6. Oct 19, 2020
  7. Oct 15, 2020
  8. Sep 04, 2020
  9. Aug 18, 2020
  10. Jul 01, 2020
  11. May 07, 2020
  12. May 06, 2020
  13. Apr 08, 2020
  14. Mar 06, 2020
  15. Feb 29, 2020
  16. Jan 30, 2020
  17. Jan 17, 2020
  18. Jan 09, 2020
  19. Jan 04, 2020
  20. Dec 13, 2019
    • Jerry Han's avatar
      drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel · 4b6dd3ca
      Jerry Han authored
      
      Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI
      panel.
      
      V11:
      - Use the backlight support in drm_panel to simplify the driver (Sam)
      
      V10:
      - Adjust init code, make the format more concise (Emil)
      
      V9:
      - kill off default_off_cmds (Emil)
      - use mipi_dsi_dcs_set_display_{on,off} in their enable/disable
          callbacks. (Emil)
      - Adjusting the delay function (Emil)
      
      V8:
      - modify PARENTHESIS_ALIGNMENT format (Sam)
      - use gpios are required API replace optional gpio API (Emil)
      
      V7:
      - Modify communication address
      
      V6:
      - Add the information of the reviewer
      - Remove unnecessary delays, The udelay_range code gracefully returns
          without hitting the scheduler on a delay of 0. (Derek)
      - Merge the same data structures, like display_mode and off_cmds (Derek)
      - Optimize the processing of results returned by
          devm_gpiod_get_optional (Derek)
      
      V5:
      - Add the information of the reviewer (Sam)
      - Delete unnecessary header files #include <linux/fb.h> (Sam)
      - The config DRM_PANEL_BOE_HIMAX8279D appears twice. Drop one of them (Sam)
      - ADD static, set_gpios function is not used outside this module (Sam)
      
      V4:
      - Frefix all function maes with boe_ (Sam)
      - Fsed "enable_gpio" replace "reset_gpio", Make it look clearer (Sam)
      - Sort include lines alphabetically (Sam)
      - Fixed entries in the makefile must be sorted alphabetically (Sam)
      - Add send_mipi_cmds function to avoid duplicating the code (Sam)
      - Add the necessary delay(reset_delay_t5) between reset and sending
          the initialization command (Rock wang)
      
      V3:
      - Remove unnecessary delays in sending initialization commands (Jitao Shi)
      
      V2:
      - Use SPDX identifier (Sam)
      - Use necessary header files replace drmP.h (Sam)
      - Delete unnecessary header files #include <linux/err.h> (Sam)
      - Specifies a GPIOs array to control the reset timing,
          instead of reading "dsi-reset-sequence" data from DTS (Sam)
      - Delete backlight_disable() function when already disabled (Sam)
      - Use devm_of_find_backlight() replace of_find_backlight_by_node() (Sam)
      - Move the necessary data in the DTS to the current file,
          like porch, display_mode and Init code etc. (Sam)
      - Add compatible device "boe,himax8279d10p" (Sam)
      
      V1:
      - Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI
          panel.
      
      Signed-off-by: default avatarJerry Han <jerry.han.hq@gmail.com>
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Reviewed-by: default avatarDerek Basehore <dbasehore@chromium.org>
      Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Cc: Jitao Shi <jitao.shi@mediatek.com>
      Cc: Rock wang <rock_wang@himax.com.cn>
      Signed-off-by: Sam Ravnborg <sam@ravnborg.org> [fixed boe_panel_get_modes + backlight]
      Link: https://patchwork.freedesktop.org/patch/msgid/20191212115208.3878-1-jerry.han.hq@gmail.com
      4b6dd3ca
  21. Aug 14, 2019
  22. Jun 26, 2019
  23. May 21, 2019
  24. Apr 23, 2019
  25. Apr 03, 2019
  26. Feb 26, 2019
  27. Jan 28, 2019
Loading