mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
drm fixes for 5.14-rc4
amdgpu: - Fix resource leak in an error path - Avoid stack contents exposure in error path - pmops check fix for S0ix vs S3 - DCN 2.1 display fixes - DCN 2.0 display fix - Backlight control fix for laptops with HDR panels - Maintainers updates i915: - Fix vbt port mask - Fix around reading the right DSC disable fuse in display_ver 10 - Split display version 9 and 10 in intel_setup_outputs msm: - iommu fault display fix - misc dp compliance fixes - dpu reg sizing fix panel: - Fix bpc for ytc700tlag_05_201c ttm: - debugfs init fixes -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmEDT9QACgkQDHTzWXnE hr63cQ/9FeQqDC1XLyA9P9N/No07jIK6TLOforMej4IhQ5csKOHPtCHw00Mf2cio WaSqE3SkaKlRbU6TZDnfZasuWgHBatHINOEufk/1qT6T4s3cMd0NWnf/k5HzVD+u xVWAXsNUavieFsRVW7QuehHyM/qtcjeQrJ1m2U5Uho+ytTiT7/x9NjbVjYdgBja0 nyOyTeu9YASLvCtwL8NdIdViaCfT1ayrq/oZqdOEVh7vKigCFkCUIbaan4sXb8vw qJVAI9ngp6+9bo7+OD0GvcM576Cw9qLesLR23eKls1NcE56mYS8pG7t6sH5gX4ow tI+pE3Vq79qH+Rlc+9BmAYbsRISSUFIZ+lTLt9fBCf8CcuYtu7hDJMaQV/Oqc61o Eh0aCwT9il2Ys3OIEdCp0g3NLJUw+GMyzBEhm7FXH8iF0+/fYSxbkNaPTKjK3uEa 3th1oCJ0vfMlaS/kGah7H1nKfIrD04z9MwxUEkYpX8FoUApP+uNs672irG1h0nJf J8NL/ohHpoQ8j7n75IGIYMuSlCQY34qq4Ux3Lef+Q5wqYptk2nWHesk/bKdtHtWj HXsRg7tva6q1j05IQI9wVZcpXJzTSTatlE9T6L4oPTJ3g/LVdrJ3MMETuUphThbW tZ7Xma1du+XZTgnRPYz67vnpeC3CLzQd6y9tHzZV2jm2p3+ntZQ= =Dn5J -----END PGP SIGNATURE----- Merge tag 'drm-fixes-2021-07-30' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular drm fixes pull, seems about the right size, lots of small fixes across the board, mostly amdgpu, but msm and i915 are in there along with panel and ttm. amdgpu: - Fix resource leak in an error path - Avoid stack contents exposure in error path - pmops check fix for S0ix vs S3 - DCN 2.1 display fixes - DCN 2.0 display fix - Backlight control fix for laptops with HDR panels - Maintainers updates i915: - Fix vbt port mask - Fix around reading the right DSC disable fuse in display_ver 10 - Split display version 9 and 10 in intel_setup_outputs msm: - iommu fault display fix - misc dp compliance fixes - dpu reg sizing fix panel: - Fix bpc for ytc700tlag_05_201c ttm: - debugfs init fixes" * tag 'drm-fixes-2021-07-30' of git://anongit.freedesktop.org/drm/drm: maintainers: add bugs and chat URLs for amdgpu drm/amdgpu/display: only enable aux backlight control for OLED panels drm/amd/display: ensure dentist display clock update finished in DCN20 drm/amd/display: Add missing DCN21 IP parameter drm/amd/display: Guard DST_Y_PREFETCH register overflow in DCN21 drm/amdgpu: Check pmops for desired suspend state drm/msm/dp: Initialize dp->aux->drm_dev before registration drm/msm/dp: signal audio plugged change at dp_pm_resume drm/msm/dp: Initialize the INTF_CONFIG register drm/msm/dp: use dp_ctrl_off_link_stream during PHY compliance test run drm/msm: Fix display fault handling drm/msm/dpu: Fix sm8250_mdp register length drm/amdgpu: Avoid printing of stack contents on firmware load error drm/amdgpu: Fix resource leak on probe error path drm/i915/display: split DISPLAY_VER 9 and 10 in intel_setup_outputs() drm/i915: fix not reading DSC disable fuse in GLK drm/i915/bios: Fix ports mask drm/panel: panel-simple: Fix proper bpc for ytc700tlag_05_201c drm/ttm: Initialize debugfs from ttm_global_init()
This commit is contained in:
commit
764a5bc89b
@ -15468,6 +15468,8 @@ M: Pan, Xinhui <Xinhui.Pan@amd.com>
|
||||
L: amd-gfx@lists.freedesktop.org
|
||||
S: Supported
|
||||
T: git https://gitlab.freedesktop.org/agd5f/linux.git
|
||||
B: https://gitlab.freedesktop.org/drm/amd/-/issues
|
||||
C: irc://irc.oftc.net/radeon
|
||||
F: drivers/gpu/drm/amd/
|
||||
F: drivers/gpu/drm/radeon/
|
||||
F: include/uapi/drm/amdgpu_drm.h
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/suspend.h>
|
||||
#include <acpi/video.h>
|
||||
#include <acpi/actbl.h>
|
||||
|
||||
@ -1042,7 +1043,7 @@ bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
|
||||
#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE)
|
||||
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
|
||||
if (adev->flags & AMD_IS_APU)
|
||||
return true;
|
||||
return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
|
@ -3504,13 +3504,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
|
||||
r = amdgpu_device_get_job_timeout_settings(adev);
|
||||
if (r) {
|
||||
dev_err(adev->dev, "invalid lockup_timeout parameter syntax\n");
|
||||
goto failed_unmap;
|
||||
return r;
|
||||
}
|
||||
|
||||
/* early init functions */
|
||||
r = amdgpu_device_ip_early_init(adev);
|
||||
if (r)
|
||||
goto failed_unmap;
|
||||
return r;
|
||||
|
||||
/* doorbell bar mapping and doorbell index init*/
|
||||
amdgpu_device_doorbell_init(adev);
|
||||
@ -3736,10 +3736,6 @@ release_ras_con:
|
||||
failed:
|
||||
amdgpu_vf_error_trans_all(adev);
|
||||
|
||||
failed_unmap:
|
||||
iounmap(adev->rmmio);
|
||||
adev->rmmio = NULL;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
|
||||
|
||||
err = psp_init_asd_microcode(psp, chip_name);
|
||||
if (err)
|
||||
goto out;
|
||||
return err;
|
||||
|
||||
snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ta.bin", chip_name);
|
||||
err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev);
|
||||
@ -80,7 +80,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
|
||||
} else {
|
||||
err = amdgpu_ucode_validate(adev->psp.ta_fw);
|
||||
if (err)
|
||||
goto out2;
|
||||
goto out;
|
||||
|
||||
ta_hdr = (const struct ta_firmware_header_v1_0 *)
|
||||
adev->psp.ta_fw->data;
|
||||
@ -105,10 +105,9 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
|
||||
|
||||
return 0;
|
||||
|
||||
out2:
|
||||
out:
|
||||
release_firmware(adev->psp.ta_fw);
|
||||
adev->psp.ta_fw = NULL;
|
||||
out:
|
||||
if (err) {
|
||||
dev_err(adev->dev,
|
||||
"psp v12.0: Failed to load firmware \"%s\"\n",
|
||||
|
@ -2429,9 +2429,9 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
|
||||
max_cll = conn_base->hdr_sink_metadata.hdmi_type1.max_cll;
|
||||
min_cll = conn_base->hdr_sink_metadata.hdmi_type1.min_cll;
|
||||
|
||||
if (caps->ext_caps->bits.oled == 1 ||
|
||||
if (caps->ext_caps->bits.oled == 1 /*||
|
||||
caps->ext_caps->bits.sdr_aux_backlight_control == 1 ||
|
||||
caps->ext_caps->bits.hdr_aux_backlight_control == 1)
|
||||
caps->ext_caps->bits.hdr_aux_backlight_control == 1*/)
|
||||
caps->aux_support = true;
|
||||
|
||||
if (amdgpu_backlight == 0)
|
||||
|
@ -197,7 +197,7 @@ void dcn20_update_clocks_update_dentist(struct clk_mgr_internal *clk_mgr, struct
|
||||
|
||||
REG_UPDATE(DENTIST_DISPCLK_CNTL,
|
||||
DENTIST_DISPCLK_WDIVIDER, dispclk_wdivider);
|
||||
// REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, 1, 5, 100);
|
||||
REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_CHG_DONE, 1, 50, 1000);
|
||||
REG_UPDATE(DENTIST_DISPCLK_CNTL,
|
||||
DENTIST_DPPCLK_WDIVIDER, dppclk_wdivider);
|
||||
REG_WAIT(DENTIST_DISPCLK_CNTL, DENTIST_DPPCLK_CHG_DONE, 1, 5, 100);
|
||||
|
@ -109,6 +109,7 @@ struct _vcs_dpi_ip_params_st dcn2_1_ip = {
|
||||
.max_page_table_levels = 4,
|
||||
.pte_chunk_size_kbytes = 2,
|
||||
.meta_chunk_size_kbytes = 2,
|
||||
.min_meta_chunk_size_bytes = 256,
|
||||
.writeback_chunk_size_kbytes = 2,
|
||||
.line_buffer_size_bits = 789504,
|
||||
.is_line_buffer_bpp_fixed = 0,
|
||||
|
@ -841,6 +841,9 @@ static bool CalculatePrefetchSchedule(
|
||||
else
|
||||
*DestinationLinesForPrefetch = dst_y_prefetch_equ;
|
||||
|
||||
// Limit to prevent overflow in DST_Y_PREFETCH register
|
||||
*DestinationLinesForPrefetch = dml_min(*DestinationLinesForPrefetch, 63.75);
|
||||
|
||||
dml_print("DML: VStartup: %d\n", VStartup);
|
||||
dml_print("DML: TCalc: %f\n", TCalc);
|
||||
dml_print("DML: TWait: %f\n", TWait);
|
||||
|
@ -2166,7 +2166,8 @@ static void
|
||||
init_vbt_missing_defaults(struct drm_i915_private *i915)
|
||||
{
|
||||
enum port port;
|
||||
int ports = PORT_A | PORT_B | PORT_C | PORT_D | PORT_E | PORT_F;
|
||||
int ports = BIT(PORT_A) | BIT(PORT_B) | BIT(PORT_C) |
|
||||
BIT(PORT_D) | BIT(PORT_E) | BIT(PORT_F);
|
||||
|
||||
if (!HAS_DDI(i915) && !IS_CHERRYVIEW(i915))
|
||||
return;
|
||||
|
@ -11361,13 +11361,19 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
|
||||
intel_ddi_init(dev_priv, PORT_B);
|
||||
intel_ddi_init(dev_priv, PORT_C);
|
||||
vlv_dsi_init(dev_priv);
|
||||
} else if (DISPLAY_VER(dev_priv) >= 9) {
|
||||
} else if (DISPLAY_VER(dev_priv) == 10) {
|
||||
intel_ddi_init(dev_priv, PORT_A);
|
||||
intel_ddi_init(dev_priv, PORT_B);
|
||||
intel_ddi_init(dev_priv, PORT_C);
|
||||
intel_ddi_init(dev_priv, PORT_D);
|
||||
intel_ddi_init(dev_priv, PORT_E);
|
||||
intel_ddi_init(dev_priv, PORT_F);
|
||||
} else if (DISPLAY_VER(dev_priv) >= 9) {
|
||||
intel_ddi_init(dev_priv, PORT_A);
|
||||
intel_ddi_init(dev_priv, PORT_B);
|
||||
intel_ddi_init(dev_priv, PORT_C);
|
||||
intel_ddi_init(dev_priv, PORT_D);
|
||||
intel_ddi_init(dev_priv, PORT_E);
|
||||
} else if (HAS_DDI(dev_priv)) {
|
||||
u32 found;
|
||||
|
||||
|
@ -325,7 +325,7 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
|
||||
info->pipe_mask &= ~BIT(PIPE_C);
|
||||
info->cpu_transcoder_mask &= ~BIT(TRANSCODER_C);
|
||||
}
|
||||
} else if (HAS_DISPLAY(dev_priv) && GRAPHICS_VER(dev_priv) >= 9) {
|
||||
} else if (HAS_DISPLAY(dev_priv) && DISPLAY_VER(dev_priv) >= 9) {
|
||||
u32 dfsm = intel_de_read(dev_priv, SKL_DFSM);
|
||||
|
||||
if (dfsm & SKL_DFSM_PIPE_A_DISABLE) {
|
||||
@ -340,7 +340,8 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
|
||||
info->pipe_mask &= ~BIT(PIPE_C);
|
||||
info->cpu_transcoder_mask &= ~BIT(TRANSCODER_C);
|
||||
}
|
||||
if (GRAPHICS_VER(dev_priv) >= 12 &&
|
||||
|
||||
if (DISPLAY_VER(dev_priv) >= 12 &&
|
||||
(dfsm & TGL_DFSM_PIPE_D_DISABLE)) {
|
||||
info->pipe_mask &= ~BIT(PIPE_D);
|
||||
info->cpu_transcoder_mask &= ~BIT(TRANSCODER_D);
|
||||
@ -352,10 +353,10 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
|
||||
if (dfsm & SKL_DFSM_DISPLAY_PM_DISABLE)
|
||||
info->display.has_fbc = 0;
|
||||
|
||||
if (GRAPHICS_VER(dev_priv) >= 11 && (dfsm & ICL_DFSM_DMC_DISABLE))
|
||||
if (DISPLAY_VER(dev_priv) >= 11 && (dfsm & ICL_DFSM_DMC_DISABLE))
|
||||
info->display.has_dmc = 0;
|
||||
|
||||
if (GRAPHICS_VER(dev_priv) >= 10 &&
|
||||
if (DISPLAY_VER(dev_priv) >= 10 &&
|
||||
(dfsm & CNL_DFSM_DISPLAY_DSC_DISABLE))
|
||||
info->display.has_dsc = 0;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ static const struct dpu_mdp_cfg sc7180_mdp[] = {
|
||||
static const struct dpu_mdp_cfg sm8250_mdp[] = {
|
||||
{
|
||||
.name = "top_0", .id = MDP_TOP,
|
||||
.base = 0x0, .len = 0x45C,
|
||||
.base = 0x0, .len = 0x494,
|
||||
.features = 0,
|
||||
.highest_bank_bit = 0x3, /* TODO: 2 for LP_DDR4 */
|
||||
.clk_ctrls[DPU_CLK_CTRL_VIG0] = {
|
||||
|
@ -771,6 +771,7 @@ int dp_catalog_panel_timing_cfg(struct dp_catalog *dp_catalog)
|
||||
dp_write_link(catalog, REG_DP_HSYNC_VSYNC_WIDTH_POLARITY,
|
||||
dp_catalog->width_blanking);
|
||||
dp_write_link(catalog, REG_DP_ACTIVE_HOR_VER, dp_catalog->dp_active);
|
||||
dp_write_p0(catalog, MMSS_DP_INTF_CONFIG, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1526,7 +1526,7 @@ static int dp_ctrl_process_phy_test_request(struct dp_ctrl_private *ctrl)
|
||||
* running. Add the global reset just before disabling the
|
||||
* link clocks and core clocks.
|
||||
*/
|
||||
ret = dp_ctrl_off(&ctrl->dp_ctrl);
|
||||
ret = dp_ctrl_off_link_stream(&ctrl->dp_ctrl);
|
||||
if (ret) {
|
||||
DRM_ERROR("failed to disable DP controller\n");
|
||||
return ret;
|
||||
|
@ -219,6 +219,7 @@ static int dp_display_bind(struct device *dev, struct device *master,
|
||||
goto end;
|
||||
}
|
||||
|
||||
dp->aux->drm_dev = drm;
|
||||
rc = dp_aux_register(dp->aux);
|
||||
if (rc) {
|
||||
DRM_ERROR("DRM DP AUX register failed\n");
|
||||
@ -1311,6 +1312,10 @@ static int dp_pm_resume(struct device *dev)
|
||||
else
|
||||
dp->dp_display.is_connected = false;
|
||||
|
||||
dp_display_handle_plugged_change(g_dp_display,
|
||||
dp->dp_display.is_connected);
|
||||
|
||||
|
||||
mutex_unlock(&dp->event_mutex);
|
||||
|
||||
return 0;
|
||||
|
@ -142,6 +142,9 @@ static const struct iommu_flush_ops null_tlb_ops = {
|
||||
.tlb_add_page = msm_iommu_tlb_add_page,
|
||||
};
|
||||
|
||||
static int msm_fault_handler(struct iommu_domain *domain, struct device *dev,
|
||||
unsigned long iova, int flags, void *arg);
|
||||
|
||||
struct msm_mmu *msm_iommu_pagetable_create(struct msm_mmu *parent)
|
||||
{
|
||||
struct adreno_smmu_priv *adreno_smmu = dev_get_drvdata(parent->dev);
|
||||
@ -157,6 +160,13 @@ struct msm_mmu *msm_iommu_pagetable_create(struct msm_mmu *parent)
|
||||
if (!ttbr1_cfg)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
/*
|
||||
* Defer setting the fault handler until we have a valid adreno_smmu
|
||||
* to avoid accidentially installing a GPU specific fault handler for
|
||||
* the display's iommu
|
||||
*/
|
||||
iommu_set_fault_handler(iommu->domain, msm_fault_handler, iommu);
|
||||
|
||||
pagetable = kzalloc(sizeof(*pagetable), GFP_KERNEL);
|
||||
if (!pagetable)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
@ -300,7 +310,6 @@ struct msm_mmu *msm_iommu_new(struct device *dev, struct iommu_domain *domain)
|
||||
|
||||
iommu->domain = domain;
|
||||
msm_mmu_init(&iommu->base, dev, &funcs, MSM_MMU_IOMMU);
|
||||
iommu_set_fault_handler(domain, msm_fault_handler, iommu);
|
||||
|
||||
atomic_set(&iommu->pagetables, 0);
|
||||
|
||||
|
@ -4166,7 +4166,7 @@ static const struct drm_display_mode yes_optoelectronics_ytc700tlag_05_201c_mode
|
||||
static const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = {
|
||||
.modes = &yes_optoelectronics_ytc700tlag_05_201c_mode,
|
||||
.num_modes = 1,
|
||||
.bpc = 6,
|
||||
.bpc = 8,
|
||||
.size = {
|
||||
.width = 154,
|
||||
.height = 90,
|
||||
|
@ -44,6 +44,8 @@ static unsigned ttm_glob_use_count;
|
||||
struct ttm_global ttm_glob;
|
||||
EXPORT_SYMBOL(ttm_glob);
|
||||
|
||||
struct dentry *ttm_debugfs_root;
|
||||
|
||||
static void ttm_global_release(void)
|
||||
{
|
||||
struct ttm_global *glob = &ttm_glob;
|
||||
@ -53,6 +55,7 @@ static void ttm_global_release(void)
|
||||
goto out;
|
||||
|
||||
ttm_pool_mgr_fini();
|
||||
debugfs_remove(ttm_debugfs_root);
|
||||
|
||||
__free_page(glob->dummy_read_page);
|
||||
memset(glob, 0, sizeof(*glob));
|
||||
@ -73,6 +76,13 @@ static int ttm_global_init(void)
|
||||
|
||||
si_meminfo(&si);
|
||||
|
||||
ttm_debugfs_root = debugfs_create_dir("ttm", NULL);
|
||||
if (IS_ERR(ttm_debugfs_root)) {
|
||||
ret = PTR_ERR(ttm_debugfs_root);
|
||||
ttm_debugfs_root = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Limit the number of pages in the pool to about 50% of the total
|
||||
* system memory.
|
||||
*/
|
||||
@ -100,6 +110,8 @@ static int ttm_global_init(void)
|
||||
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
|
||||
&glob->bo_count);
|
||||
out:
|
||||
if (ret && ttm_debugfs_root)
|
||||
debugfs_remove(ttm_debugfs_root);
|
||||
if (ret)
|
||||
--ttm_glob_use_count;
|
||||
mutex_unlock(&ttm_global_mutex);
|
||||
|
@ -72,22 +72,6 @@ pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
struct dentry *ttm_debugfs_root;
|
||||
|
||||
static int __init ttm_init(void)
|
||||
{
|
||||
ttm_debugfs_root = debugfs_create_dir("ttm", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit ttm_exit(void)
|
||||
{
|
||||
debugfs_remove(ttm_debugfs_root);
|
||||
}
|
||||
|
||||
module_init(ttm_init);
|
||||
module_exit(ttm_exit);
|
||||
|
||||
MODULE_AUTHOR("Thomas Hellstrom, Jerome Glisse");
|
||||
MODULE_DESCRIPTION("TTM memory manager subsystem (for DRM device)");
|
||||
MODULE_LICENSE("GPL and additional rights");
|
||||
|
Loading…
Reference in New Issue
Block a user