Commit 91c93e47 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2024-06-13' of...

Merge tag 'drm-misc-next-2024-06-13' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-next

drm-misc-next for 6.11:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
 - Sprinkle MODULE_DESCRIPTIONS everywhere they are missing
 - bridge: Remove drm_bridge_chain_mode_fixup
 - ci: Require a more recent version of mesa, improve farm estup and
   test generation
 - mipi-dbi: Remove mipi_dbi_machine_little_endian, make SPI bits per
   word configurable, support RGB888, and allow pixel formats to be
   specified in the DT.
 - mm: Remove drm_mm_replace_node
 - panic: Allow to dump kmsg to the screen
 - print: Add a drm prefix to warn level messages too, remove
   ___drm_dbg, consolidate prefix handling

Driver Changes:
 - sun4i: Rework the blender setup for DE2
 - bridges:
   - bridge-connector: Plumb in the new HDMI helpers
   - samsung-dsim: Fix timings calculation
   - tc358767: Plenty of small fixes
 - panels:
   - More cleanup of prepare / enable state tracking in drivers
   - New panel: PrimeView PM070WL4,

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Maxime Ripard <mripard@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240613-cicada-of-infinite-unity-0955ca@houat
parents 6dac1612 a13aaf15
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -50,6 +50,12 @@ description: |
      |        Command or data         |
      |<D7><D6><D5><D4><D3><D2><D1><D0>|

  The standard defines one pixel format for type C: RGB111. The industry
  however has decided to provide the type A/B interface pixel formats also on
  the Type C interface and most common among these are RGB565 and RGB666.
  The MIPI DCS command set_address_mode (36h) has one bit that controls RGB/BGR
  order. This gives each supported RGB format a BGR variant.

  The panel resolution is specified using the panel-timing node properties
  hactive (width) and vactive (height). The other mandatory panel-timing
  properties should be set to zero except clock-frequency which can be
@@ -93,6 +99,28 @@ properties:

  spi-3wire: true

  format:
    description: >
      Pixel format in bit order as going on the wire:
        * `x2r1g1b1r1g1b1` - RGB111, 2 pixels per byte
        * `x2b1g1r1b1g1r1` - BGR111, 2 pixels per byte
        * `x1r1g1b1x1r1g1b1` - RGB111, 2 pixels per byte
        * `x1b1g1r1x1b1g1r1` - BGR111, 2 pixels per byte
        * `r5g6b5` - RGB565, 2 bytes
        * `b5g6r5` - BGR565, 2 bytes
        * `r6x2g6x2b6x2` - RGB666, 3 bytes
        * `b6x2g6x2r6x2` - BGR666, 3 bytes
    enum:
      - x2r1g1b1r1g1b1
      - x2b1g1r1b1g1r1
      - x1r1g1b1x1r1g1b1
      - x1b1g1r1x1b1g1r1
      - r5g6b5
      - b5g6r5
      - r6x2g6x2b6x2
      - b6x2g6x2r6x2
    default: r5g6b5

required:
  - compatible
  - reg
@@ -119,6 +147,8 @@ examples:
            reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
            write-only;

            format = "r5g6b5";

            backlight = <&backlight>;

            width-mm = <35>;
+2 −0
Original line number Diff line number Diff line
@@ -236,6 +236,8 @@ properties:
      - powertip,ph128800t006-zhc01
        # POWERTIP PH800480T013-IDF2 7.0" WVGA TFT LCD panel
      - powertip,ph800480t013-idf02
        # PrimeView PM070WL4 7.0" 800x480 TFT LCD panel
      - primeview,pm070wl4
        # QiaoDian XianShi Corporation 4"3 TFT LCD panel
      - qiaodian,qd43003c0-40
        # Shenzhen QiShenglong Industrialist Co., Ltd. Gopher 2b 4.3" 480(RGB)x272 TFT LCD panel
+2 −0
Original line number Diff line number Diff line
@@ -1164,6 +1164,8 @@ patternProperties:
    description: PowerVR (deprecated, use img)
  "^powkiddy,.*":
    description: Powkiddy
  "^primeview,.*":
    description: Prime View International (PVI)
  "^primux,.*":
    description: Primux Trading, S.L.
  "^probox2,.*":
+26 −21
Original line number Diff line number Diff line
@@ -469,30 +469,35 @@ Contact: Thomas Zimmermann <tzimmermann@suse.de>

Level: Starter

Clean up checks for already prepared/enabled in panels
------------------------------------------------------

In a whole pile of panel drivers, we have code to make the
prepare/unprepare/enable/disable callbacks behave as no-ops if they've already
been called. To get some idea of the duplicated code, try::

  git grep 'if.*>prepared' -- drivers/gpu/drm/panel
  git grep 'if.*>enabled' -- drivers/gpu/drm/panel

In the patch ("drm/panel: Check for already prepared/enabled in drm_panel")
we've moved this check to the core. Now we can most definitely remove the
check from the individual panels and save a pile of code.

In adition to removing the check from the individual panels, it is believed
that even the core shouldn't need this check and that should be considered
an error if other code ever relies on this check. The check in the core
currently prints a warning whenever something is relying on this check with
dev_warn(). After a little while, we likely want to promote this to a
WARN(1) to help encourage folks not to rely on this behavior.
Remove disable/unprepare in remove/shutdown in panel-simple and panel-edp
-------------------------------------------------------------------------

As of commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in
drm_panel"), we have a check in the drm_panel core to make sure nobody
double-calls prepare/enable/disable/unprepare. Eventually that should probably
be turned into a WARN_ON() or somehow made louder, but right now we actually
expect it to trigger and so we don't want it to be too loud.

Specifically, that warning will trigger for panel-edp and panel-simple at
shutdown time because those panels hardcode a call to drm_panel_disable()
and drm_panel_unprepare() at shutdown and remove time that they call regardless
of panel state. On systems with a properly coded DRM modeset driver that
calls drm_atomic_helper_shutdown() this is pretty much guaranteed to cause
the warning to fire.

Unfortunately we can't safely remove the calls in panel-edp and panel-simple
until we're sure that all DRM modeset drivers that are used with those panels
properly call drm_atomic_helper_shutdown(). This TODO item is to validate
that all DRM modeset drivers used with panel-edp and panel-simple properly
call drm_atomic_helper_shutdown() and then remove the calls to
disable/unprepare from those panels. Alternatively, this TODO item could be
removed by convincing stakeholders that those calls are fine and downgrading
the error message in drm_panel_disable() / drm_panel_unprepare() to a
debug-level message.

Contact: Douglas Anderson <dianders@chromium.org>

Level: Starter/Intermediate
Level: Intermediate

Transition away from using mipi_dsi_*_write_seq()
-------------------------------------------------
+13 −0
Original line number Diff line number Diff line
@@ -137,6 +137,19 @@ config DRM_PANIC_DEBUG
	  This is unsafe and should not be enabled on a production build.
	  If in doubt, say "N".

config DRM_PANIC_SCREEN
	string "Panic screen formater"
	default "user"
	depends on DRM_PANIC
	help
	  This option enable to choose what will be displayed when a kernel
	  panic occurs. You can choose between "user", a short message telling
	  the user to reboot the system, or "kmsg" which will display the last
	  lines of kmsg.
	  This can also be overridden by drm.panic_screen=xxxx kernel parameter
	  or by writing to /sys/module/drm/parameters/panic_screen sysfs entry
	  Default is "user"

config DRM_DEBUG_DP_MST_TOPOLOGY_REFS
        bool "Enable refcount backtrace history in the DP MST helpers"
	depends on STACKTRACE_SUPPORT
Loading