Skip to content
  1. Nov 13, 2021
  2. Nov 12, 2021
  3. Nov 11, 2021
  4. Nov 10, 2021
  5. Nov 06, 2021
  6. Nov 05, 2021
    • Maxime Ripard's avatar
      drm/vc4: hdmi: Introduce a scdc_enabled flag · 19986461
      Maxime Ripard authored
      We currently rely on two functions, vc4_hdmi_supports_scrambling() and
      vc4_hdmi_mode_needs_scrambling() to determine if we should enable and
      disable the scrambler for any given mode.
      
      Since we might need to disable the controller at boot, we also always
      run vc4_hdmi_disable_scrambling() and thus call those functions without
      a mode yet, which in turns need to make some special casing in order for
      it to work.
      
      Instead of duplicating the check for whether or not we need to take care
      of the scrambler in both vc4_hdmi_enable_scrambling() and
      vc4_hdmi_disable_scrambling(), we can do that check only when we enable
      it and store whether or not it's been enabled in our private structure.
      
      We also need to initialize that flag at true to make sure we disable the
      scrambler at boot since we can't really know its state yet.
      
      This allows to simplify a bit that part of the driver, and removes one
      user of our copy of the CRTC adjusted mode outside of KMS (since
      vc4_hdmi_disable_scrambling() might be called from the hotplug interrupt
      handler).
      
      It also removes our last user of the legacy encoder->crtc pointer.
      
      Link: https://lore.kernel.org/r/20211025141113.702757-10-maxime@cerno.tech
      
      
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      19986461
    • Maxime Ripard's avatar
      drm/vc4: hdmi: Introduce an output_enabled flag · ebae26d6
      Maxime Ripard authored
      We currently poke at encoder->crtc in the ALSA code path to determine
      whether the HDMI output is enabled or not, and thus whether we should
      allow the audio output.
      
      However, that pointer is deprecated and shouldn't really be used by
      atomic drivers anymore. Since we have the infrastructure in place now,
      let's just create a flag that we toggle to report whether the controller
      is currently enabled and use that instead of encoder->crtc in ALSA.
      
      Link: https://lore.kernel.org/r/20211025141113.702757-9-maxime@cerno.tech
      
      
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      ebae26d6