linux_dsm_epyc7002/drivers/gpu/drm/i915
Stanislav Lisovskiy 7a9ccdd1e0 drm/i915: Use intel_plane_data_rate for min_cdclk calculation
There seems to be a bit of confusing redundancy in a way, how
plane data rate/min cdclk are calculated.
In fact both min cdclk, pixel rate and plane data rate are all
part of the same formula as per BSpec.

However currently we have intel_plane_data_rate, which is used
to calculate plane data rate and which is also used in bandwidth
calculations. However for calculating min_cdclk we have another
piece of code, doing almost same calculation, but a bit differently
and in a different place. However as both are actually part of same
formula, probably would be wise to use plane data rate calculations
as a basis anyway, thus avoiding code duplication and possible bugs
related to this.

Another thing is that I've noticed that during min_cdclk calculations
we account for plane scaling, while for plane data rate, we don't.
crtc->pixel_rate seems to account only for pipe ratio, however it is
clearly stated in BSpec that plane data rate also need to account
plane ratio as well.

So what this commit does is:
- Adds a plane ratio calculation to intel_plane_data_rate
- Removes redundant calculations from skl_plane_min_cdclk which is
  used for gen9+ and now uses intel_plane_data_rate as a basis from
  there as well.

v2: - Don't use 64 division if not needed(Ville Syrjälä)
    - Now use intel_plane_pixel_rate as a basis for calculations both
      at intel_plane_data_rate and skl_plane_min_cdclk(Ville Syrjälä)

v3: - Again fix the division macro
    - Fix plane_pixel_rate to pixel_rate at intel_plane_pixel_rate
      callsites

v4: - Renamed skl_plane_ratio function back(Ville Syrjälä)

v5: - Don't precalculate plane pixel rate for invisible plane,
      check for visibility first, as in invisible case it will
      have dst_w and dst_h equal to zero, causing divide error.

v6: - Removed useless warn in intel_plane_pixel_rate(Ville Syrjälä)
    - Fixed alignment in intel_plane_data_rate(Ville Syrjälä)
    - Changed pixel_rate type to be unsigned int in
      skl_plane_min_cdclk(Ville Syrjälä)

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/20200227150935.2107-1-stanislav.lisovskiy@intel.com
2020-03-02 19:27:25 +02:00
..
display drm/i915: Use intel_plane_data_rate for min_cdclk calculation 2020-03-02 19:27:25 +02:00
gem drm/i915/selftests: Fix return in assert_mmap_offset() 2020-02-28 21:13:16 +00:00
gt drm/i915/gt: Expose heartbeat interval via sysfs 2020-02-28 22:03:49 +00:00
gvt Merge tag 'gvt-next-2020-02-26' of https://github.com/intel/gvt-linux into drm-intel-next-queued 2020-02-26 14:58:15 -08:00
oa
selftests drm/i915/selftests: Disable heartbeat around manual pulse tests 2020-02-28 09:25:41 +00:00
.gitignore
i915_active_types.h
i915_active.c drm/i915: Skip barriers inside waits 2020-02-28 09:24:29 +00:00
i915_active.h drm/i915/gt: Acquire ce->active before ce->pin_count/ce->pin_mutex 2020-02-12 13:24:45 +02:00
i915_buddy.c
i915_buddy.h
i915_cmd_parser.c drm/i915/cmd_parser: conversion to struct drm_device logging macros. 2020-02-04 11:29:40 +02:00
i915_debugfs_params.c drm/i915: Include the debugfs params header for its own definition 2020-01-17 13:00:16 +00:00
i915_debugfs_params.h drm/i915/params: add i915 parameters to debugfs 2020-01-15 15:10:16 +02:00
i915_debugfs.c drm/i915/guc: Kill USES_GUC_SUBMISSION macro 2020-02-20 17:48:03 +00:00
i915_debugfs.h drm/i915: split out display debugfs to a separate file 2020-02-14 13:26:51 +02:00
i915_drv.c drm/i915: add i915_ioc32.h for compat 2020-03-02 13:32:37 +02:00
i915_drv.h drm/i915: remove unused orig_clock i915 member 2020-03-02 13:32:51 +02:00
i915_fixed.h
i915_gem_evict.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_gem_fence_reg.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_gem_fence_reg.h
i915_gem_gtt.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_gem_gtt.h
i915_gem.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_gem.h
i915_getparam.c
i915_globals.c
i915_globals.h
i915_gpu_error.c drm/i915: Update drm/i915 bug filing URL 2020-02-17 11:16:05 +02:00
i915_gpu_error.h drm/i915: Track hw reported context runtime 2020-02-16 15:16:22 +00:00
i915_ioc32.c drm/i915: add i915_ioc32.h for compat 2020-03-02 13:32:37 +02:00
i915_ioc32.h drm/i915: add i915_ioc32.h for compat 2020-03-02 13:32:37 +02:00
i915_irq.c drm/i915/crc: move pipe_crc from drm_i915_private to intel_crtc 2020-03-02 12:58:26 +02:00
i915_irq.h
i915_memcpy.c
i915_memcpy.h
i915_mm.c
i915_params.c drm/i915: Remove 'prefault_disable' modparam 2020-01-27 11:45:35 +00:00
i915_params.h drm/i915: Mark i915.reset as unsigned 2020-02-05 18:51:52 +00:00
i915_pci.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_perf_types.h
i915_perf.c drm/i915/perf: Manually acquire engine-wakeref around use of kernel_context 2020-02-28 14:05:34 +00:00
i915_perf.h
i915_pmu.c drm/i915/pmu: Avoid using globals for PMU events 2020-02-21 17:31:15 +00:00
i915_pmu.h drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_priolist_types.h
i915_pvinfo.h
i915_query.c
i915_query.h
i915_reg.h drm/i915: Set up PIPE_MISC truncate bit on tgl+ 2020-02-27 21:14:33 +02:00
i915_request.c drm/i915/gt: Expose busywait duration to sysfs 2020-02-28 22:03:41 +00:00
i915_request.h drm/i915/gt: Allow temporary suspension of inflight requests 2020-02-12 16:55:58 +02:00
i915_scatterlist.c
i915_scatterlist.h
i915_scheduler_types.h
i915_scheduler.c drm/i915: Double check bumping after the spinlock 2020-02-20 13:27:36 +00:00
i915_scheduler.h
i915_selftest.h
i915_suspend.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
i915_suspend.h
i915_sw_fence_work.c
i915_sw_fence_work.h
i915_sw_fence.c drm/i915/gem: Don't leak non-persistent requests on changing engines 2020-02-11 21:58:39 +00:00
i915_sw_fence.h drm/i915/gem: Don't leak non-persistent requests on changing engines 2020-02-11 21:58:39 +00:00
i915_switcheroo.c drm: Avoid drm_global_mutex for simple inc/dec of dev->open_count 2020-01-24 17:41:34 +00:00
i915_switcheroo.h
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c drm/i915/gt: Expose engine properties via sysfs 2020-02-28 22:03:19 +00:00
i915_sysfs.h
i915_trace_points.c
i915_trace.h drm/i915/trace: i915_request.prio is a signed value 2020-01-28 15:53:36 +00:00
i915_user_extensions.c
i915_user_extensions.h
i915_utils.c drm/i915: Update drm/i915 bug filing URL 2020-02-17 11:16:05 +02:00
i915_utils.h
i915_vgpu.c drm/i915: conversion to new logging macros in i915/i915_vgpu.c 2020-01-17 17:41:33 +02:00
i915_vgpu.h
i915_vma_types.h
i915_vma.c drm/i915: Check that the vma hasn't been closed before we insert it 2020-02-21 17:32:27 +00:00
i915_vma.h drm/i915: Use the async worker to avoid reclaim tainting the ggtt->mutex 2020-01-30 21:35:43 +00:00
intel_device_info.c drm/i915: significantly reduce the use of <drm/i915_drm.h> 2020-02-27 08:35:09 +02:00
intel_device_info.h drm/i915: Read rawclk_freq earlier 2020-02-19 14:09:18 +00:00
intel_dram.c drm/i915/dram: hide the dram structs better 2020-03-02 13:32:27 +02:00
intel_dram.h drm/i915: split out intel_dram.[ch] from i915_drv.c 2020-02-27 09:16:01 +02:00
intel_gvt.c drm/i915/guc: Apply new uC status tracking to GuC submission as well 2020-02-20 17:48:06 +00:00
intel_gvt.h
intel_memory_region.c drm/i915: convert to new logging macros in i915/intel_memory_region.c 2020-01-17 17:44:19 +02:00
intel_memory_region.h
intel_pch.c drm/i915: Make WARN* drm specific where drm_priv ptr is available 2020-01-22 17:54:33 +02:00
intel_pch.h
intel_pm.c drm/i915: Use a sentinel to terminate the dbuf slice arrays 2020-03-02 16:42:18 +02:00
intel_pm.h drm/i915: Manipulate DBuf slices properly 2020-02-05 19:19:23 +02:00
intel_region_lmem.c
intel_region_lmem.h
intel_runtime_pm.c
intel_runtime_pm.h
intel_sideband.c drm/i915: Make WARN* drm specific where drm_priv ptr is available 2020-01-22 17:54:33 +02:00
intel_sideband.h
intel_uncore.c drm/i915: Make WARN* drm specific where uncore or stream ptr is available 2020-01-22 17:57:39 +02:00
intel_uncore.h
intel_wakeref.c
intel_wakeref.h
intel_wopcm.c
intel_wopcm.h
Kconfig drm/i915: Update drm/i915 bug filing URL 2020-02-17 11:16:05 +02:00
Kconfig.debug
Kconfig.profile drm/i915/gt: Expose heartbeat interval via sysfs 2020-02-28 22:03:49 +00:00
Kconfig.unstable
Makefile drm/i915/gt: Expose engine properties via sysfs 2020-02-28 22:03:19 +00:00
vlv_suspend.c drm/i915: switch vlv_suspend to use intel uncore register accessors 2020-02-17 11:29:51 +02:00
vlv_suspend.h drm/i915: split out vlv/chv specific suspend/resume code 2020-02-17 11:29:35 +02:00