mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 20:42:33 -04:00
Merge tag 'drm-next-5.6-2019-12-11' of git://people.freedesktop.org/~agd5f/linux into drm-next
drm-next-5.6-2019-12-11: amdgpu: - Add MST atomic routines - Add support for DMCUB (new helper microengine for displays) - Add OEM i2c support in DC - Use vstartup for vblank events on DCN - Simplify Kconfig for DC - Renoir fixes for DC - Clean up function pointers in DC - Initial support for HDCP 2.x - Misc code cleanups - GFX10 fixes - Rework JPEG engine handling for VCN - Add clock and power gating support for JPEG - BACO support for Arcturus - Cleanup PSP ring handling - Add framework for using BACO with runtime pm to save power - Move core pci state handling out of the driver for pm ops - Allow guest power control in 1 VF case with SR-IOV - SR-IOV fixes - RAS fixes - Support for power metrics on renoir - Golden settings updates for gfx10 - Enable gfxoff on supported navi10 skus - Update MAINTAINERS amdkfd: - Clean up generational gfx code - Fixes for gfx10 - DIQ fixes - Share more code with amdgpu radeon: - PPC DMA fix - Register checker fixes for r1xx/r2xx - Misc cleanups From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191211223020.7510-1-alexander.deucher@amd.com
This commit is contained in:
@@ -43,14 +43,12 @@ endif
|
||||
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_lib.o := $(dml_ccflags)
|
||||
|
||||
ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
ifdef CONFIG_DRM_AMD_DC_DCN
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_vba.o := $(dml_ccflags)
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20.o := $(dml_ccflags)
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20.o := $(dml_ccflags)
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20v2.o := $(dml_ccflags)
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20v2.o := $(dml_ccflags)
|
||||
endif
|
||||
ifdef CONFIG_DRM_AMD_DC_DCN2_1
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_mode_vba_21.o := $(dml_ccflags)
|
||||
CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_rq_dlg_calc_21.o := $(dml_ccflags)
|
||||
endif
|
||||
@@ -61,11 +59,9 @@ CFLAGS_$(AMDDALPATH)/dc/dml/dml_common_defs.o := $(dml_ccflags)
|
||||
DML = display_mode_lib.o display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o \
|
||||
dml_common_defs.o
|
||||
|
||||
ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
ifdef CONFIG_DRM_AMD_DC_DCN
|
||||
DML += display_mode_vba.o dcn20/display_rq_dlg_calc_20.o dcn20/display_mode_vba_20.o
|
||||
DML += dcn20/display_rq_dlg_calc_20v2.o dcn20/display_mode_vba_20v2.o
|
||||
endif
|
||||
ifdef CONFIG_DRM_AMD_DC_DCN2_1
|
||||
DML += dcn21/display_rq_dlg_calc_21.o dcn21/display_mode_vba_21.o
|
||||
endif
|
||||
|
||||
|
||||
@@ -2577,7 +2577,8 @@ static void dml20_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPer
|
||||
mode_lib->vba.MinActiveDRAMClockChangeMargin
|
||||
+ mode_lib->vba.DRAMClockChangeLatency;
|
||||
|
||||
if (mode_lib->vba.MinActiveDRAMClockChangeMargin > 50) {
|
||||
if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
|
||||
mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
|
||||
mode_lib->vba.DRAMClockChangeWatermark += 25;
|
||||
mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
|
||||
} else {
|
||||
|
||||
@@ -2611,9 +2611,13 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
|
||||
mode_lib->vba.MinActiveDRAMClockChangeMargin
|
||||
+ mode_lib->vba.DRAMClockChangeLatency;
|
||||
|
||||
if (mode_lib->vba.MinActiveDRAMClockChangeMargin > 50) {
|
||||
if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
|
||||
mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
|
||||
mode_lib->vba.DRAMClockChangeWatermark += 25;
|
||||
mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
|
||||
} else if (mode_lib->vba.DummyPStateCheck &&
|
||||
mode_lib->vba.MinActiveDRAMClockChangeMargin > 0) {
|
||||
mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
|
||||
} else {
|
||||
if (mode_lib->vba.SynchronizedVBlank || mode_lib->vba.NumberOfActivePlanes == 1) {
|
||||
mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vblank;
|
||||
|
||||
@@ -929,8 +929,7 @@ static void dml20_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
|
||||
min_dst_y_ttu_vblank = min_ttu_vblank * pclk_freq_in_mhz / (double) htotal;
|
||||
dlg_vblank_start = interlaced ? (vblank_start / 2) : vblank_start;
|
||||
|
||||
disp_dlg_regs->min_dst_y_next_start = (unsigned int) (((double) dlg_vblank_start
|
||||
+ min_dst_y_ttu_vblank) * dml_pow(2, 2));
|
||||
disp_dlg_regs->min_dst_y_next_start = (unsigned int) ((double) dlg_vblank_start * dml_pow(2, 2));
|
||||
ASSERT(disp_dlg_regs->min_dst_y_next_start < (unsigned int) dml_pow(2, 18));
|
||||
|
||||
dml_print("DML_DLG: %s: min_dcfclk_mhz = %3.2f\n",
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
|
||||
#include "../display_mode_lib.h"
|
||||
#include "../dml_inline_defs.h"
|
||||
@@ -6126,4 +6125,3 @@ static double CalculateExtraLatency(
|
||||
return CalculateExtraLatency;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
|
||||
#include "../display_mode_lib.h"
|
||||
#include "../display_mode_vba.h"
|
||||
@@ -1523,8 +1522,8 @@ static void dml_rq_dlg_get_dlg_params(
|
||||
|
||||
disp_dlg_regs->refcyc_per_vm_group_vblank = get_refcyc_per_vm_group_vblank(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
|
||||
disp_dlg_regs->refcyc_per_vm_group_flip = get_refcyc_per_vm_group_flip(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
|
||||
disp_dlg_regs->refcyc_per_vm_req_vblank = get_refcyc_per_vm_req_vblank(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;;
|
||||
disp_dlg_regs->refcyc_per_vm_req_flip = get_refcyc_per_vm_req_flip(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;;
|
||||
disp_dlg_regs->refcyc_per_vm_req_vblank = get_refcyc_per_vm_req_vblank(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
|
||||
disp_dlg_regs->refcyc_per_vm_req_flip = get_refcyc_per_vm_req_flip(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
|
||||
|
||||
// Clamp to max for now
|
||||
if (disp_dlg_regs->refcyc_per_vm_group_vblank >= (unsigned int)dml_pow(2, 23))
|
||||
@@ -1820,4 +1819,3 @@ static void calculate_ttu_cursor(
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -135,9 +135,7 @@ enum dm_validation_status {
|
||||
DML_FAIL_DIO_SUPPORT,
|
||||
DML_FAIL_NOT_ENOUGH_DSC,
|
||||
DML_FAIL_DSC_CLK_REQUIRED,
|
||||
#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
|
||||
DML_FAIL_DSC_VALIDATION_FAILURE,
|
||||
#endif
|
||||
DML_FAIL_URGENT_LATENCY,
|
||||
DML_FAIL_REORDERING_BUFFER,
|
||||
DML_FAIL_DISPCLK_DPPCLK,
|
||||
|
||||
@@ -25,18 +25,13 @@
|
||||
|
||||
#include "display_mode_lib.h"
|
||||
#include "dc_features.h"
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
|
||||
#include "dcn20/display_mode_vba_20.h"
|
||||
#include "dcn20/display_rq_dlg_calc_20.h"
|
||||
#include "dcn20/display_mode_vba_20v2.h"
|
||||
#include "dcn20/display_rq_dlg_calc_20v2.h"
|
||||
#endif
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_1
|
||||
#include "dcn21/display_mode_vba_21.h"
|
||||
#include "dcn21/display_rq_dlg_calc_21.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
|
||||
const struct dml_funcs dml20_funcs = {
|
||||
.validate = dml20_ModeSupportAndSystemConfigurationFull,
|
||||
.recalculate = dml20_recalculate,
|
||||
@@ -50,16 +45,13 @@ const struct dml_funcs dml20v2_funcs = {
|
||||
.rq_dlg_get_dlg_reg = dml20v2_rq_dlg_get_dlg_reg,
|
||||
.rq_dlg_get_rq_reg = dml20v2_rq_dlg_get_rq_reg
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_1
|
||||
const struct dml_funcs dml21_funcs = {
|
||||
.validate = dml21_ModeSupportAndSystemConfigurationFull,
|
||||
.recalculate = dml21_recalculate,
|
||||
.rq_dlg_get_dlg_reg = dml21_rq_dlg_get_dlg_reg,
|
||||
.rq_dlg_get_rq_reg = dml21_rq_dlg_get_rq_reg
|
||||
};
|
||||
#endif
|
||||
|
||||
void dml_init_instance(struct display_mode_lib *lib,
|
||||
const struct _vcs_dpi_soc_bounding_box_st *soc_bb,
|
||||
@@ -70,19 +62,15 @@ void dml_init_instance(struct display_mode_lib *lib,
|
||||
lib->ip = *ip_params;
|
||||
lib->project = project;
|
||||
switch (project) {
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
case DML_PROJECT_NAVI10:
|
||||
lib->funcs = dml20_funcs;
|
||||
break;
|
||||
case DML_PROJECT_NAVI10v2:
|
||||
lib->funcs = dml20v2_funcs;
|
||||
break;
|
||||
#endif
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_1
|
||||
case DML_PROJECT_DCN21:
|
||||
lib->funcs = dml21_funcs;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -27,20 +27,14 @@
|
||||
|
||||
|
||||
#include "dml_common_defs.h"
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
#include "display_mode_vba.h"
|
||||
#endif
|
||||
|
||||
enum dml_project {
|
||||
DML_PROJECT_UNDEFINED,
|
||||
DML_PROJECT_RAVEN1,
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
DML_PROJECT_NAVI10,
|
||||
DML_PROJECT_NAVI10v2,
|
||||
#endif
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_1
|
||||
DML_PROJECT_DCN21,
|
||||
#endif
|
||||
};
|
||||
|
||||
struct display_mode_lib;
|
||||
@@ -70,9 +64,7 @@ struct display_mode_lib {
|
||||
struct _vcs_dpi_ip_params_st ip;
|
||||
struct _vcs_dpi_soc_bounding_box_st soc;
|
||||
enum dml_project project;
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
struct vba_vars_st vba;
|
||||
#endif
|
||||
struct dal_logger *logger;
|
||||
struct dml_funcs funcs;
|
||||
};
|
||||
|
||||
@@ -99,6 +99,7 @@ struct _vcs_dpi_soc_bounding_box_st {
|
||||
unsigned int num_chans;
|
||||
unsigned int vmm_page_size_bytes;
|
||||
unsigned int hostvm_min_page_size_bytes;
|
||||
unsigned int gpuvm_min_page_size_bytes;
|
||||
double dram_clock_change_latency_us;
|
||||
double dummy_pstate_latency_us;
|
||||
double writeback_dram_clock_change_latency_us;
|
||||
@@ -112,6 +113,7 @@ struct _vcs_dpi_soc_bounding_box_st {
|
||||
bool do_urgent_latency_adjustment;
|
||||
double urgent_latency_adjustment_fabric_clock_component_us;
|
||||
double urgent_latency_adjustment_fabric_clock_reference_mhz;
|
||||
bool disable_dram_clock_change_vactive_support;
|
||||
};
|
||||
|
||||
struct _vcs_dpi_ip_params_st {
|
||||
@@ -145,7 +147,6 @@ struct _vcs_dpi_ip_params_st {
|
||||
unsigned int writeback_interface_buffer_size_kbytes;
|
||||
unsigned int writeback_line_buffer_buffer_size;
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
unsigned int writeback_10bpc420_supported;
|
||||
double writeback_max_hscl_ratio;
|
||||
double writeback_max_vscl_ratio;
|
||||
@@ -155,7 +156,6 @@ struct _vcs_dpi_ip_params_st {
|
||||
unsigned int writeback_max_vscl_taps;
|
||||
unsigned int writeback_line_buffer_luma_buffer_size;
|
||||
unsigned int writeback_line_buffer_chroma_buffer_size;
|
||||
#endif
|
||||
|
||||
unsigned int max_page_table_levels;
|
||||
unsigned int max_num_dpp;
|
||||
@@ -225,6 +225,7 @@ struct _vcs_dpi_display_pipe_source_params_st {
|
||||
int source_scan;
|
||||
int sw_mode;
|
||||
int macro_tile_size;
|
||||
unsigned int surface_height_y;
|
||||
unsigned int viewport_width;
|
||||
unsigned int viewport_height;
|
||||
unsigned int viewport_y_y;
|
||||
@@ -401,6 +402,7 @@ struct _vcs_dpi_display_rq_misc_params_st {
|
||||
struct _vcs_dpi_display_rq_params_st {
|
||||
unsigned char yuv420;
|
||||
unsigned char yuv420_10bpc;
|
||||
unsigned char rgbe_alpha;
|
||||
display_rq_misc_params_st misc;
|
||||
display_rq_sizing_params_st sizing;
|
||||
display_rq_dlg_params_st dlg;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
|
||||
#include "display_mode_lib.h"
|
||||
#include "display_mode_vba.h"
|
||||
@@ -222,13 +221,17 @@ static void fetch_socbb_params(struct display_mode_lib *mode_lib)
|
||||
mode_lib->vba.SRExitTime = soc->sr_exit_time_us;
|
||||
mode_lib->vba.SREnterPlusExitTime = soc->sr_enter_plus_exit_time_us;
|
||||
mode_lib->vba.DRAMClockChangeLatency = soc->dram_clock_change_latency_us;
|
||||
mode_lib->vba.DummyPStateCheck = soc->dram_clock_change_latency_us == soc->dummy_pstate_latency_us;
|
||||
mode_lib->vba.DRAMClockChangeSupportsVActive = !soc->disable_dram_clock_change_vactive_support ||
|
||||
mode_lib->vba.DummyPStateCheck;
|
||||
|
||||
mode_lib->vba.Downspreading = soc->downspread_percent;
|
||||
mode_lib->vba.DRAMChannelWidth = soc->dram_channel_width_bytes; // new!
|
||||
mode_lib->vba.FabricDatapathToDCNDataReturn = soc->fabric_datapath_to_dcn_data_return_bytes; // new!
|
||||
mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading = soc->dcn_downspread_percent; // new
|
||||
mode_lib->vba.DISPCLKDPPCLKVCOSpeed = soc->dispclk_dppclk_vco_speed_mhz; // new
|
||||
mode_lib->vba.VMMPageSize = soc->vmm_page_size_bytes;
|
||||
mode_lib->vba.GPUVMMinPageSize = soc->vmm_page_size_bytes / 1024;
|
||||
mode_lib->vba.GPUVMMinPageSize = soc->gpuvm_min_page_size_bytes / 1024;
|
||||
mode_lib->vba.HostVMMinPageSize = soc->hostvm_min_page_size_bytes / 1024;
|
||||
// Set the voltage scaling clocks as the defaults. Most of these will
|
||||
// be set to different values by the test
|
||||
@@ -858,4 +861,3 @@ double CalculateWriteBackDISPCLK(
|
||||
return CalculateWriteBackDISPCLK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DRM_AMD_DC_DCN2_0
|
||||
|
||||
#ifndef __DML2_DISPLAY_MODE_VBA_H__
|
||||
#define __DML2_DISPLAY_MODE_VBA_H__
|
||||
@@ -155,6 +154,8 @@ struct vba_vars_st {
|
||||
double UrgentLatencySupportUsChroma;
|
||||
unsigned int DSCFormatFactor;
|
||||
|
||||
bool DummyPStateCheck;
|
||||
bool DRAMClockChangeSupportsVActive;
|
||||
bool PrefetchModeSupported;
|
||||
enum self_refresh_affinity AllowDRAMSelfRefreshOrDRAMClockChangeInVblank; // Mode Support only
|
||||
double XFCRemoteSurfaceFlipDelay;
|
||||
@@ -870,4 +871,3 @@ double CalculateWriteBackDISPCLK(
|
||||
unsigned int WritebackChromaLineBufferWidth);
|
||||
|
||||
#endif /* _DML2_DISPLAY_MODE_VBA_H_ */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user