1. 17 Dec, 2019 1 commit
    • Jani Nikula's avatar
      drm/print: introduce new struct drm_device based logging macros · fb6c7ab8
      Jani Nikula authored
      Add new struct drm_device based logging macros modeled after the core
      kernel device based logging macros. These would be preferred over the
      drm printk and struct device based macros in drm code, where possible.
      
      We have existing drm specific struct device based logging functions, but
      they are too verbose to use for two main reasons:
      
       * The names are unnecessarily long, for example DRM_DEV_DEBUG_KMS().
      
       * The use of struct device over struct drm_device is too generic for
         most users, leading to an extra dereference.
      
      For example:
      
      	DRM_DEV_DEBUG_KMS(drm->dev, "Hello, world\n");
      
      vs.
      
      	drm_dbg_kms(drm, "Hello, world\n");
      
      It's a matter of taste, but the SHOUTING UPPERCASE has been argued to be
      less readable than lowercase.
      
      Some names are changed from old DRM names to be based on the core kernel
      logging functions. For example, NOTE -> notice, ERROR -> err, DEBUG ->
      dbg.
      
      Due to the conflation of DRM_DEBUG and DRM_DEBUG_DRIVER macro use
      (DRM_DEBUG is used widely in drivers though it's supposed to be a core
      debugging category), they are named as drm_dbg_core and drm_dbg,
      respectively.
      
      The drm_err and _once/_ratelimited variants no longer include the
      function name in order to be able to use the core device based logging
      macros. Arguably this is not a significant change; error messages should
      not be so common to be only distinguishable by the function name.
      
      Ratelimited debug logging macros are to be added later.
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Acked-by: default avatarSean Paul <sean@poorly.run>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191210123050.8799-1-jani.nikula@intel.com
      fb6c7ab8
  2. 16 Dec, 2019 27 commits
  3. 14 Dec, 2019 8 commits
  4. 13 Dec, 2019 4 commits
    • Linus Walleij's avatar
      drm/gma500: Pass GPIO for Intel MID using descriptors · cd6a1ca3
      Linus Walleij authored
      The GMA500 driver is using the legacy GPIO API to fetch
      three optional display control GPIO lines from the SFI
      description used by the Medfield platform.
      
      Switch this over to use GPIO descriptors and delete the
      custom platform data.
      
      We create three new static locals in the tc35876x bridge
      code but it is hardly any worse than the I2C client static
      local already there: I tried first to move it to the DRM
      driver state container but there are workarounds for
      probe order in the code so I just stayed off it, as the
      result is unpredictable.
      
      People wanting to do a more throrugh and proper cleanup
      of the GMA500 driver can work on top of this, I can't
      solve much more since I don't have access to the hardware,
      I can only attempt to tidy up my GPIO corner.
      
      Cc: Daniel Stone <daniels@collabora.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191206094301.76368-1-linus.walleij@linaro.orgSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      cd6a1ca3
    • Daniel Vetter's avatar
      drm/atmel: plane_state->fb iff plane_state->crtc · 2840f1f0
      Daniel Vetter authored
      Checking both is one too much, so wrap a WARN_ON around it to stope
      the copypasta.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Boris Brezillon <bbrezillon@kernel.org>
      Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
      Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
      Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-3-daniel.vetter@ffwll.ch
      2840f1f0
    • 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
    • Daniel Vetter's avatar
      drm/gma500: globle no more! · 2f69293a
      Daniel Vetter authored
      globle, goblin, moblin?
      
      It's dead code, we lucked out.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191211120001.1167980-1-daniel.vetter@ffwll.ch
      2f69293a