linux_dsm_epyc7002/drivers/gpu/drm/i915/display
Stanislav Lisovskiy 0f0f9aeee3 drm/i915: Manipulate DBuf slices properly
Start manipulating DBuf slices as a mask,
but not as a total number, as current approach
doesn't give us full control on all combinations
of slices, which we might need(like enabling S2
only can't enabled by setting enabled_slices=1).

Removed wrong code from intel_get_ddb_size as
it doesn't match to BSpec. For now still just
use DBuf slice until proper algorithm is implemented.

Other minor code refactoring to get prepared
for major DBuf assignment changes landed:
- As now enabled slices contain a mask
  we still need some value which should
  reflect how much DBuf slices are supported
  by the platform, now device info contains
  num_supported_dbuf_slices.
- Removed unneeded assertion as we are now
  manipulating slices in a more proper way.

v2: Start using enabled_slices in dev_priv

v3: "enabled_slices" is now "enabled_dbuf_slices_mask",
    as this now sits in dev_priv independently.

v4: - Fixed debug print formatting to hex(Matt Roper)
    - Optimized dbuf slice updates to be used only
      if slice union is different from current conf(Matt Roper)
    - Fixed some functions to be static(Matt Roper)
    - Created a parameterized version for DBUF_CTL to
      simplify DBuf programming cycle(Matt Roper)
    - Removed unrequred field from GEN10_FEATURES(Matt Roper)

v5: - Removed redundant programming dbuf slices helper(Ville Syrjälä)
    - Started to use parameterized loop for hw readout to get slices
      (Ville Syrjälä)
    - Added back assertion checking amount of DBUF slices enabled
      after DC states 5/6 transition, also added new assertion
      as starting from ICL DMC seems to restore the last DBuf
      power state set, rather than power up all dbuf slices
      as assertion was previously expecting(Ville Syrjälä)

v6: - Now using enum for DBuf slices in this patch (Ville Syrjälä)
    - Removed gen11_assert_dbuf_enabled and put gen9_assert_dbuf_enabled
      back, as we really need to have a single unified assert here
      however currently enabling always slice 1 is enforced by BSpec,
      so we will have to OR enabled slices mask with 1 in order
      to be consistent with BSpec, that way we can unify that
      assertion and against the actual state from the driver, but
      not some hardcoded value.(concluded with Ville)
    - Remove parameterized DBUF_CTL version, to extract it to another
      patch.(Ville Syrjälä)
v7:
    - Removed unneeded hardcoded return value for older gens from
      intel_enabled_dbuf_slices_mask - this now is handled in a
      unified manner since device info anyway returns max dbuf slices
      as 1 for older platforms(Matthew Roper)
    - Now using INTEL_INFO(dev_priv)->num_supported_dbuf_slices instead
      of intel_dbuf_max_slices function as it is trivial(Matthew Roper)

v8: - Fixed icl_dbuf_disable to disable all dbufs still(Ville Syrjälä)

v9: - Renamed _DBUF_CTL_S to DBUF_CTL_S(Ville Syrjälä)
    - Now using power_domain mutex to protect from race condition, which
      can occur because intel_dbuf_slices_update might be running in
      parallel to gen9_dc_off_power_well_enable being called from
      intel_dp_detect for instance, which causes assertion triggered by
      race condition, as gen9_assert_dbuf_enabled might preempt this
      when registers were already updated, while dev_priv was not.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200202230630.8975-6-stanislav.lisovskiy@intel.com
2020-02-05 19:19:23 +02:00
..
dvo_ch7xxx.c
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
icl_dsi.c drm/i915/display/icl_dsi: Make WARN* drm specific where drm_priv ptr is available 2020-02-02 14:30:23 +02:00
intel_acpi.c drm/i915/acpi: Move the code to populate ACPI device ID into intel_acpi 2020-01-24 12:58:39 +02:00
intel_acpi.h drm/i915/acpi: Move the code to populate ACPI device ID into intel_acpi 2020-01-24 12:58:39 +02:00
intel_atomic_plane.c drm/i915/display: Fix NULL-crtc deref in calc_min_cdclk() 2020-02-04 09:38:11 +00:00
intel_atomic_plane.h drm/i915: Convert cdclk to global state 2020-01-31 17:00:44 +02:00
intel_atomic.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_atomic.h drm/i915: Introduce better global state handling 2020-01-31 17:00:44 +02:00
intel_audio.c drm/i915/audio: Skip the cdclk modeset if no pipes attached 2020-02-04 09:38:11 +00:00
intel_audio.h
intel_bios.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_bios.h drm/i915/bios: add intel_bios_port_supports_*() 2020-01-21 10:51:44 +02:00
intel_bw.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_bw.h drm/i915: Convert bandwidth state to global state 2020-01-31 17:00:44 +02:00
intel_cdclk.c drm/i915: Store active_pipes bitmask in cdclk state 2020-01-31 17:00:45 +02:00
intel_cdclk.h drm/i915: Store active_pipes bitmask in cdclk state 2020-01-31 17:00:45 +02:00
intel_color.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_color.h
intel_combo_phy.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_combo_phy.h
intel_connector.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_connector.h
intel_crt.c drm/i915/crt: Configure connector->polled and encoder->hpd_pin consistently 2020-02-04 23:14:33 +02:00
intel_crt.h
intel_ddi.c drm/i915/hdcp: move update pipe code to hdcp 2020-02-05 11:08:28 +02:00
intel_ddi.h drm/i915: Call hsw_fdi_link_train() directly() 2019-12-18 16:47:34 +02:00
intel_de.h drm/i915: add display engine uncore helpers 2020-01-23 11:07:00 +02:00
intel_display_power.c drm/i915: Manipulate DBuf slices properly 2020-02-05 19:19:23 +02:00
intel_display_power.h drm/i915: Introduce parameterized DBUF_CTL 2020-02-05 19:16:57 +02:00
intel_display_types.h drm/i915: Manipulate DBuf slices properly 2020-02-05 19:19:23 +02:00
intel_display.c drm/i915: Manipulate DBuf slices properly 2020-02-05 19:19:23 +02:00
intel_display.h drm/i915: Introduce intel_calc_active_pipes() 2020-01-31 17:00:44 +02:00
intel_dp_aux_backlight.c drm/i915: Don't use VBT for detecting DPCD backlight controls 2020-01-22 11:15:38 +02:00
intel_dp_aux_backlight.h
intel_dp_link_training.c
intel_dp_link_training.h
intel_dp_mst.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_dp_mst.h drm/i915/tgl: Select master transcoder for MST stream 2019-12-23 09:26:41 -08:00
intel_dp.c drm/i915/dp: use intel_de_*() functions for register access 2020-01-29 10:46:01 +02:00
intel_dp.h
intel_dpio_phy.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_dpio_phy.h
intel_dpll_mgr.c drm/i915/display/dpll_mgr: Make WARN* drm specific where drm_device ptr is available 2020-02-04 10:46:45 +02:00
intel_dpll_mgr.h
intel_dsb.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_dsb.h drm/i915/dsb: remove atomic operations 2019-11-18 13:27:09 -08:00
intel_dsi_dcs_backlight.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_dsi_dcs_backlight.h
intel_dsi_vbt.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_dsi.c
intel_dsi.h drm/i915: Pass intel_encoder to enc_to_*() 2020-01-13 20:10:51 +02:00
intel_dvo_dev.h
intel_dvo.c drm/i915/dvo: Mark TMDS DVO connectors as polled 2020-02-04 23:32:52 +02:00
intel_dvo.h
intel_fbc.c drm/i915/display/fbc: Make WARN* drm specific where drm_priv ptr is available 2020-02-04 10:46:49 +02:00
intel_fbc.h drm/i915/fbc: Move the plane state check into the fbc functions 2020-01-15 17:16:32 +02:00
intel_fbdev.c drm/i915/fbdev: Make WARN* drm specific where drm_device ptr is available 2020-02-04 10:46:56 +02:00
intel_fbdev.h
intel_fifo_underrun.c drm/i915/fifo_underrun: use intel_de_*() functions for register access 2020-01-27 16:38:33 +02:00
intel_fifo_underrun.h
intel_frontbuffer.c drm/i915: Hold reference to intel_frontbuffer as we track activity 2019-12-18 12:09:57 +00:00
intel_frontbuffer.h drm/i915: Hold reference to intel_frontbuffer as we track activity 2019-12-18 12:09:57 +00:00
intel_global_state.c drm/i915: Introduce better global state handling 2020-01-31 17:00:44 +02:00
intel_global_state.h drm/i915: Introduce better global state handling 2020-01-31 17:00:44 +02:00
intel_gmbus.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_gmbus.h
intel_hdcp.c drm/i915/hdcp: move update pipe code to hdcp 2020-02-05 11:08:28 +02:00
intel_hdcp.h drm/i915/hdcp: move update pipe code to hdcp 2020-02-05 11:08:28 +02:00
intel_hdmi.c drm/i915/display/hdmi: Make WARN* drm specific where drm_device ptr is available 2020-02-04 10:53:02 +02:00
intel_hdmi.h drm/i915: Pass intel_encoder to enc_to_*() 2020-01-13 20:10:51 +02:00
intel_hotplug.c drm/i915: Introduce intel_connector_hpd_pin() 2020-02-04 23:09:34 +02:00
intel_hotplug.h
intel_lpe_audio.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_lpe_audio.h
intel_lspcon.c drm/i915: Pass intel_encoder to enc_to_*() 2020-01-13 20:10:51 +02:00
intel_lspcon.h
intel_lvds.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_lvds.h
intel_opregion.c drm/i915/display: Make WARN* drm specific where drm_device ptr is available 2020-02-04 11:00:04 +02:00
intel_opregion.h
intel_overlay.c drm/i915/display/overlay: Make WARN* drm specific where drm_priv ptr is available 2020-02-04 10:53:06 +02:00
intel_overlay.h
intel_panel.c drm/i915/panel: automatic conversion to drm_device based logging macros. 2020-02-04 11:13:48 +02:00
intel_panel.h
intel_pipe_crc.c drm/i915/pipe_crc: automatic conversion to drm_device based logging macros. 2020-02-04 11:13:45 +02:00
intel_pipe_crc.h
intel_psr.c drm/i915/psr: automatic conversion to drm_device based logging macros. 2020-02-04 11:13:42 +02:00
intel_psr.h drm/i915/display: Force the state compute phase once to enable PSR 2020-01-08 08:12:01 -08:00
intel_quirks.c drm/i915/quirks: automatic conversion to drm_device based logging macros. 2020-02-04 11:13:39 +02:00
intel_quirks.h
intel_sdvo_regs.h
intel_sdvo.c drm/i915/sdvo: automatic conversion to drm_device based logging macros. 2020-02-04 11:13:36 +02:00
intel_sdvo.h
intel_sprite.c drm/i915/sprite: automatic conversion to drm_device based logging macros 2020-02-04 11:13:33 +02:00
intel_sprite.h
intel_tc.c drm/i915/tc: automatic conversion to drm_device based logging macros. 2020-02-04 11:13:31 +02:00
intel_tc.h
intel_tv.c drm/i915/tv: automatic conversion to drm_device based logging macros. 2020-02-04 11:13:26 +02:00
intel_tv.h
intel_vbt_defs.h drm/i915/vbt: Rename BDB_LVDS_POWER to BDB_LFP_POWER 2020-01-14 12:38:59 -08:00
intel_vdsc.c drm/i915/vdsc: convert to struct drm_device based logging macros. 2020-02-04 11:13:23 +02:00
intel_vdsc.h drm/i915/dsc: add basic hardware state readout support 2019-12-11 08:16:16 +02:00
intel_vga.c drm/i915/vga: conversion to drm_device based logging macros. 2020-02-04 11:13:20 +02:00
intel_vga.h
vlv_dsi_pll.c drm/i915/vlv_dsi_pll: conversion to struct drm_device logging macros. 2020-02-04 11:13:15 +02:00
vlv_dsi.c drm/i915/vlv_dsi: conversion to drm_device based logging macros. 2020-02-04 11:13:18 +02:00