mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 19:43:54 +07:00
7a9ccdd1e0
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 |
||
---|---|---|
.. | ||
display | ||
gem | ||
gt | ||
gvt | ||
oa | ||
selftests | ||
.gitignore | ||
i915_active_types.h | ||
i915_active.c | ||
i915_active.h | ||
i915_buddy.c | ||
i915_buddy.h | ||
i915_cmd_parser.c | ||
i915_debugfs_params.c | ||
i915_debugfs_params.h | ||
i915_debugfs.c | ||
i915_debugfs.h | ||
i915_drv.c | ||
i915_drv.h | ||
i915_fixed.h | ||
i915_gem_evict.c | ||
i915_gem_fence_reg.c | ||
i915_gem_fence_reg.h | ||
i915_gem_gtt.c | ||
i915_gem_gtt.h | ||
i915_gem.c | ||
i915_gem.h | ||
i915_getparam.c | ||
i915_globals.c | ||
i915_globals.h | ||
i915_gpu_error.c | ||
i915_gpu_error.h | ||
i915_ioc32.c | ||
i915_ioc32.h | ||
i915_irq.c | ||
i915_irq.h | ||
i915_memcpy.c | ||
i915_memcpy.h | ||
i915_mm.c | ||
i915_params.c | ||
i915_params.h | ||
i915_pci.c | ||
i915_perf_types.h | ||
i915_perf.c | ||
i915_perf.h | ||
i915_pmu.c | ||
i915_pmu.h | ||
i915_priolist_types.h | ||
i915_pvinfo.h | ||
i915_query.c | ||
i915_query.h | ||
i915_reg.h | ||
i915_request.c | ||
i915_request.h | ||
i915_scatterlist.c | ||
i915_scatterlist.h | ||
i915_scheduler_types.h | ||
i915_scheduler.c | ||
i915_scheduler.h | ||
i915_selftest.h | ||
i915_suspend.c | ||
i915_suspend.h | ||
i915_sw_fence_work.c | ||
i915_sw_fence_work.h | ||
i915_sw_fence.c | ||
i915_sw_fence.h | ||
i915_switcheroo.c | ||
i915_switcheroo.h | ||
i915_syncmap.c | ||
i915_syncmap.h | ||
i915_sysfs.c | ||
i915_sysfs.h | ||
i915_trace_points.c | ||
i915_trace.h | ||
i915_user_extensions.c | ||
i915_user_extensions.h | ||
i915_utils.c | ||
i915_utils.h | ||
i915_vgpu.c | ||
i915_vgpu.h | ||
i915_vma_types.h | ||
i915_vma.c | ||
i915_vma.h | ||
intel_device_info.c | ||
intel_device_info.h | ||
intel_dram.c | ||
intel_dram.h | ||
intel_gvt.c | ||
intel_gvt.h | ||
intel_memory_region.c | ||
intel_memory_region.h | ||
intel_pch.c | ||
intel_pch.h | ||
intel_pm.c | ||
intel_pm.h | ||
intel_region_lmem.c | ||
intel_region_lmem.h | ||
intel_runtime_pm.c | ||
intel_runtime_pm.h | ||
intel_sideband.c | ||
intel_sideband.h | ||
intel_uncore.c | ||
intel_uncore.h | ||
intel_wakeref.c | ||
intel_wakeref.h | ||
intel_wopcm.c | ||
intel_wopcm.h | ||
Kconfig | ||
Kconfig.debug | ||
Kconfig.profile | ||
Kconfig.unstable | ||
Makefile | ||
vlv_suspend.c | ||
vlv_suspend.h |