1. 22 6月, 2022 1 次提交
  2. 12 5月, 2022 1 次提交
    • H
      drm/vc4: hdmi: Fix build error for implicit function declaration · 6fed53de
      Hui Tang 提交于
      drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_connector_detect’:
      drivers/gpu/drm/vc4/vc4_hdmi.c:228:7: error: implicit declaration of function ‘gpiod_get_value_cansleep’; did you mean ‘gpio_get_value_cansleep’? [-Werror=implicit-function-declaration]
         if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio))
             ^~~~~~~~~~~~~~~~~~~~~~~~
             gpio_get_value_cansleep
        CC [M]  drivers/gpu/drm/vc4/vc4_validate.o
        CC [M]  drivers/gpu/drm/vc4/vc4_v3d.o
        CC [M]  drivers/gpu/drm/vc4/vc4_validate_shaders.o
        CC [M]  drivers/gpu/drm/vc4/vc4_debugfs.o
      drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
      drivers/gpu/drm/vc4/vc4_hdmi.c:2883:23: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration]
        vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
                             ^~~~~~~~~~~~~~~~~~~~~~~
                             devm_clk_get_optional
      drivers/gpu/drm/vc4/vc4_hdmi.c:2883:59: error: ‘GPIOD_IN’ undeclared (first use in this function); did you mean ‘GPIOF_IN’?
        vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
                                                                 ^~~~~~~~
                                                                 GPIOF_IN
      drivers/gpu/drm/vc4/vc4_hdmi.c:2883:59: note: each undeclared identifier is reported only once for each function it appears in
      cc1: all warnings being treated as errors
      
      Fixes: 6800234c ("drm/vc4: hdmi: Convert to gpiod")
      Signed-off-by: NHui Tang <tanghui20@huawei.com>
      Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220510135148.247719-1-tanghui20@huawei.com
      6fed53de
  3. 25 4月, 2022 2 次提交
  4. 21 4月, 2022 2 次提交
    • J
      drm/vc4: hdmi: Remove vc4_hdmi_encoder · 8687b535
      José Expósito 提交于
      The vc4_hdmi_encoder struct was used exclusively to cache the value
      returned by drm_detect_hdmi_monitor() in order to avoid calling it
      multiple times.
      
      Now that drm_detect_hdmi_monitor() has been replaced with
      drm_display_info.is_hdmi, there is no need to have an extra struct.
      
      Remove vc4_hdmi_encoder.
      Signed-off-by: NJosé Expósito <jose.exposito89@gmail.com>
      Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220420114500.187664-3-jose.exposito89@gmail.com
      8687b535
    • J
      drm/vc4: hdmi: Replace drm_detect_hdmi_monitor() with is_hdmi · c3c2f38c
      José Expósito 提交于
      Once EDID is parsed, the monitor HDMI support information is cached in
      drm_display_info.is_hdmi by drm_parse_hdmi_vsdb_video().
      
      This driver calls drm_detect_hdmi_monitor() to receive the same
      information and stores its own cached value in
      vc4_hdmi_encoder.hdmi_monitor, which is less efficient.
      
      Avoid calling drm_detect_hdmi_monitor() and use drm_display_info.is_hdmi
      instead. This also allows to remove vc4_hdmi_encoder.hdmi_monitor.
      
      drm_detect_hdmi_monitor() is called in vc4_hdmi_connector_detect() and
      vc4_hdmi_connector_get_modes(). In both cases it is safe to rely on
      drm_display_info.is_hdmi as shown by ftrace:
      
      $ sudo trace-cmd record -p function_graph -l "vc4_hdmi_*" -l "drm_*"
      
      vc4_hdmi_connector_detect:
      
          vc4_hdmi_connector_detect() {
            drm_get_edid() {
              drm_connector_update_edid_property() {
                drm_add_display_info() {
                  drm_reset_display_info();
                  drm_for_each_detailed_block.part.0();
                  drm_parse_cea_ext() {
                    drm_find_cea_extension();
                    drm_parse_hdmi_vsdb_video();
                    /* drm_display_info.is_hdmi is cached here */
                  }
                }
              }
            }
            /* drm_display_info.is_hdmi is used here */
          }
      
      vc4_hdmi_connector_get_modes:
      
          vc4_hdmi_connector_get_modes() {
            drm_get_edid() {
              drm_connector_update_edid_property() {
                drm_add_display_info() {
                  drm_reset_display_info();
                  drm_for_each_detailed_block.part.0();
                  drm_parse_cea_ext() {
                    drm_find_cea_extension();
                    drm_parse_hdmi_vsdb_video();
                    /* drm_display_info.is_hdmi is cached here */
                  }
                }
              }
            }
            /* drm_display_info.is_hdmi is used here */
            drm_connector_update_edid_property();
          }
      Signed-off-by: NJosé Expósito <jose.exposito89@gmail.com>
      Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220420114500.187664-2-jose.exposito89@gmail.com
      c3c2f38c
  5. 06 4月, 2022 1 次提交
  6. 24 3月, 2022 7 次提交
  7. 21 2月, 2022 1 次提交
    • V
      drm/vc4: Use drm_mode_copy() · d8a8cf82
      Ville Syrjälä 提交于
      struct drm_display_mode embeds a list head, so overwriting
      the full struct with another one will corrupt the list
      (if the destination mode is on a list). Use drm_mode_copy()
      instead which explicitly preserves the list head of
      the destination mode.
      
      Even if we know the destination mode is not on any list
      using drm_mode_copy() seems decent as it sets a good
      example. Bad examples of not using it might eventually
      get copied into code where preserving the list head
      actually matters.
      
      Obviously one case not covered here is when the mode
      itself is embedded in a larger structure and the whole
      structure is copied. But if we are careful when copying
      into modes embedded in structures I think we can be a
      little more reassured that bogus list heads haven't been
      propagated in.
      
      @is_mode_copy@
      @@
      drm_mode_copy(...)
      {
      ...
      }
      
      @depends on !is_mode_copy@
      struct drm_display_mode *mode;
      expression E, S;
      @@
      (
      - *mode = E
      + drm_mode_copy(mode, &E)
      |
      - memcpy(mode, E, S)
      + drm_mode_copy(mode, E)
      )
      
      @depends on !is_mode_copy@
      struct drm_display_mode mode;
      expression E;
      @@
      (
      - mode = E
      + drm_mode_copy(&mode, &E)
      |
      - memcpy(&mode, E, S)
      + drm_mode_copy(&mode, E)
      )
      
      @@
      struct drm_display_mode *mode;
      @@
      - &*mode
      + mode
      
      Cc: Emma Anholt <emma@anholt.net>
      Cc: Maxime Ripard <mripard@kernel.org>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220218100403.7028-18-ville.syrjala@linux.intel.com
      d8a8cf82
  8. 18 2月, 2022 1 次提交
  9. 03 2月, 2022 3 次提交
  10. 02 2月, 2022 1 次提交
  11. 25 1月, 2022 7 次提交
  12. 05 11月, 2021 6 次提交
  13. 04 11月, 2021 4 次提交
  14. 25 10月, 2021 3 次提交