Skip to content
Snippets Groups Projects
  1. Feb 06, 2025
  2. Feb 04, 2025
  3. Jan 16, 2025
    • AngeloGioacchino Del Regno's avatar
      drm: panel: Add driver for Himax HX8279 and Startek KD070FHFID078 · b715f053
      AngeloGioacchino Del Regno authored
      
      Add a driver for the Himax HX8279-D MIPI-DSI DriverIC with support
      for the Startek KX070FHFID078 7.0" 1200x1920 IPS panel, found on
      various MediaTek Genio Evaluation Kit boards.
      
      Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      b715f053
    • Cristian Ciocaltea's avatar
      drm/connector: hdmi: Handle NULL display mode in state check helper · 5088e665
      Cristian Ciocaltea authored
      
      drm_atomic_helper_connector_hdmi_check() helper makes use of
      connector_state_get_mode() to obtain a drm_display_mode pointer, but it
      doesn't validate it, which may lead to a NULL pointer dereference in
      some cases, i.e. unloading a DRM module:
      
      [ 1002.910414] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      [...]
      [ 1002.923833] Hardware name: Radxa ROCK 5B (DT)
      [ 1002.924819] pc : drm_match_cea_mode+0x30/0x280 [drm]
      [ 1002.925318] lr : hdmi_try_format_bpc+0x7c/0x580 [drm_display_helper]
      [...]
      [ 1002.932411] Call trace:
      [ 1002.932626]  drm_match_cea_mode+0x30/0x280 [drm] (P)
      [ 1002.933120]  hdmi_try_format_bpc+0x7c/0x580 [drm_display_helper]
      [ 1002.933662]  drm_atomic_helper_connector_hdmi_check+0x10c/0x478 [drm_display_helper]
      [ 1002.934355]  drm_bridge_connector_atomic_check+0x20/0x40 [drm_display_helper]
      [ 1002.934993]  drm_atomic_helper_check_modeset+0x698/0xd28 [drm_kms_helper]
      [ 1002.935607]  drm_atomic_helper_check+0x28/0xb8 [drm_kms_helper]
      [ 1002.936143]  drm_atomic_check_only+0x794/0x988 [drm]
      [ 1002.936635]  drm_atomic_commit+0x60/0xe0 [drm]
      [ 1002.937082]  drm_atomic_helper_disable_all+0x184/0x218 [drm_kms_helper]
      [ 1002.937678]  drm_atomic_helper_shutdown+0x90/0x150 [drm_kms_helper]
      [ 1002.938243]  rockchip_drm_unbind+0x38/0x80 [rockchipdrm]
      [ 1002.938720]  component_master_del+0xac/0xf8
      [ 1002.939089]  rockchip_drm_platform_remove+0x34/0x78 [rockchipdrm]
      [...]
      
      Add the missing NULL check before passing the mode pointer further.
      
      Fixes: f035f409 ("drm/connector: hdmi: Calculate TMDS character rate")
      Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Signed-off-by: default avatarCristian Ciocaltea <cristian.ciocaltea@collabora.com>
      5088e665
  4. Jan 15, 2025
    • AngeloGioacchino Del Regno's avatar
      soc: mediatek: mt8188-mmsys: Migrate to MMSYS_ROUTE() macro · 405ccf26
      AngeloGioacchino Del Regno authored
      
      Change the initialization data in the arrays of structure
      mtk_mmsys_routes to make use of the MMSYS_ROUTE() macro:
      this will make sure that each array entry's SEL value fits
      in its corresponding register mask with a compile time check.
      
      Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      405ccf26
    • AngeloGioacchino Del Regno's avatar
      soc: mediatek: mtk-mmsys: Add compile time check for mmsys routes · 6e909221
      AngeloGioacchino Del Regno authored
      
      Every MediaTek SoC with multimedia capabilities has an array of
      structure mtk_mmsys_routes that defines a multimedia connection
      between hardware components.
      
      This connection is activated by writing a (masked) value in each
      specific register, and the association between from->to path and
      value to write is expressed as an entry in that array.
      
      Failing to set the right path does not give any meaningful error
      and makes things to simply not work as the data will either not
      be retrieved from the right input port, or will be written to
      the wrong output port (or both): since a misconfiguration may
      effectively still be a possibly correct configuration at the HW
      level, this may be only giving side effects in terms of simply
      getting no functionality but, again, no errors.
      
      In order to reduce room for mistakes in declarations of the
      mmsys routes, add a macro that compile-time checks that the
      provided value does at least fit in the register mask.
      
      Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      6e909221
  5. Jan 14, 2025
Loading