Commit 1254f05c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'drm-fixes-2021-08-06' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Regular weekly fixes pull, live from a Brisbane lockdown with kids at
  home.

  A big bunch of scattered amdgpu fixes, but they are all pretty small,
  minor i915 fixes, kmb, and one vmwgfx regression fixes, all pretty
  quiet for this time.

  amdgpu:
   - Fix potential out-of-bounds read when updating GPUVM mapping
   - Renoir powergating fix
   - Yellow Carp updates
   - 8K fix for navi1x
   - Beige Goby updates and new DIDs
   - Fix DMUB firmware version output
   - EDP fix
   - pmops config fix

  i915:
   - Call i915_globals_exit if pci_register_device fails
   - (follow on fix for section mismatch)
   - Correct SFC_DONE register offset

  kmb:
   - DMA fix
   - driver date/version macros

  vmwgfx:
   - Fix I/O memory access on 64-bit systems"

* tag 'drm-fixes-2021-08-06' of git://anongit.freedesktop.org/drm/drm:
  drm/amdgpu: add DID for beige goby
  drm/amdgpu/display: fix DMUB firmware version info
  drm/amd/display: workaround for hard hang on HPD on native DP
  drm/amd/display: Fix resetting DCN3.1 HW when resuming from S4
  drm/amd/display: Increase stutter watermark for dcn303
  drm/amd/display: Fix Dynamic bpp issue with 8K30 with Navi 1X
  drm/amd/display: Assume LTTPR interop for DCN31+
  drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled
  drm/amd/pm: update yellow carp pmfw interface version
  drm/i915: fix i915_globals_exit() section mismatch error
  drm/i915: Call i915_globals_exit() if pci_register_device() fails
  drm/i915: Correct SFC_DONE register offset
  drm/vmwgfx: Fix a 64bit regression on svga3
  drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.
  drm/amdgpu: Fix out-of-bounds read when update mapping
  drm/kmb: Define driver date and major/minor version
  drm/kmb: Enable LCD DMA for low TVDDCV
parents 902e7f37 d186f9c2
...@@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void) ...@@ -1040,7 +1040,7 @@ void amdgpu_acpi_detect(void)
*/ */
bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev) bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev)
{ {
#if defined(CONFIG_AMD_PMC) || defined(CONFIG_AMD_PMC_MODULE) #if IS_ENABLED(CONFIG_AMD_PMC) && IS_ENABLED(CONFIG_PM_SLEEP)
if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) { if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
if (adev->flags & AMD_IS_APU) if (adev->flags & AMD_IS_APU)
return pm_suspend_target_state == PM_SUSPEND_TO_IDLE; return pm_suspend_target_state == PM_SUSPEND_TO_IDLE;
......
...@@ -1213,6 +1213,13 @@ static const struct pci_device_id pciidlist[] = { ...@@ -1213,6 +1213,13 @@ static const struct pci_device_id pciidlist[] = {
{0x1002, 0x740F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ALDEBARAN|AMD_EXP_HW_SUPPORT}, {0x1002, 0x740F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ALDEBARAN|AMD_EXP_HW_SUPPORT},
{0x1002, 0x7410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ALDEBARAN|AMD_EXP_HW_SUPPORT}, {0x1002, 0x7410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ALDEBARAN|AMD_EXP_HW_SUPPORT},
/* BEIGE_GOBY */
{0x1002, 0x7420, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
{0x1002, 0x7421, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
{0x1002, 0x7422, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
{0x1002, 0x7423, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
{0x1002, 0x743F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
{0, 0, 0} {0, 0, 0}
}; };
......
...@@ -54,11 +54,12 @@ static inline void amdgpu_res_first(struct ttm_resource *res, ...@@ -54,11 +54,12 @@ static inline void amdgpu_res_first(struct ttm_resource *res,
{ {
struct drm_mm_node *node; struct drm_mm_node *node;
if (!res) { if (!res || res->mem_type == TTM_PL_SYSTEM) {
cur->start = start; cur->start = start;
cur->size = size; cur->size = size;
cur->remaining = size; cur->remaining = size;
cur->node = NULL; cur->node = NULL;
WARN_ON(res && start + size > res->num_pages << PAGE_SHIFT);
return; return;
} }
......
...@@ -1295,6 +1295,16 @@ static bool is_raven_kicker(struct amdgpu_device *adev) ...@@ -1295,6 +1295,16 @@ static bool is_raven_kicker(struct amdgpu_device *adev)
return false; return false;
} }
static bool check_if_enlarge_doorbell_range(struct amdgpu_device *adev)
{
if ((adev->asic_type == CHIP_RENOIR) &&
(adev->gfx.me_fw_version >= 0x000000a5) &&
(adev->gfx.me_feature_version >= 52))
return true;
else
return false;
}
static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev) static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
{ {
if (gfx_v9_0_should_disable_gfxoff(adev->pdev)) if (gfx_v9_0_should_disable_gfxoff(adev->pdev))
...@@ -3675,7 +3685,16 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring) ...@@ -3675,7 +3685,16 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring)
if (ring->use_doorbell) { if (ring->use_doorbell) {
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER, WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER,
(adev->doorbell_index.kiq * 2) << 2); (adev->doorbell_index.kiq * 2) << 2);
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER, /* If GC has entered CGPG, ringing doorbell > first page
* doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to
* workaround this issue. And this change has to align with firmware
* update.
*/
if (check_if_enlarge_doorbell_range(adev))
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
(adev->doorbell.size - 4));
else
WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
(adev->doorbell_index.userqueue_end * 2) << 2); (adev->doorbell_index.userqueue_end * 2) << 2);
} }
......
...@@ -1548,6 +1548,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) ...@@ -1548,6 +1548,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
} }
hdr = (const struct dmcub_firmware_header_v1_0 *)adev->dm.dmub_fw->data; hdr = (const struct dmcub_firmware_header_v1_0 *)adev->dm.dmub_fw->data;
adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
adev->firmware.ucode[AMDGPU_UCODE_ID_DMCUB].ucode_id = adev->firmware.ucode[AMDGPU_UCODE_ID_DMCUB].ucode_id =
...@@ -1561,7 +1562,6 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) ...@@ -1561,7 +1562,6 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
adev->dm.dmcub_fw_version); adev->dm.dmcub_fw_version);
} }
adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
adev->dm.dmub_srv = kzalloc(sizeof(*adev->dm.dmub_srv), GFP_KERNEL); adev->dm.dmub_srv = kzalloc(sizeof(*adev->dm.dmub_srv), GFP_KERNEL);
dmub_srv = adev->dm.dmub_srv; dmub_srv = adev->dm.dmub_srv;
......
...@@ -66,9 +66,11 @@ int rn_get_active_display_cnt_wa( ...@@ -66,9 +66,11 @@ int rn_get_active_display_cnt_wa(
for (i = 0; i < context->stream_count; i++) { for (i = 0; i < context->stream_count; i++) {
const struct dc_stream_state *stream = context->streams[i]; const struct dc_stream_state *stream = context->streams[i];
/* Extend the WA to DP for Linux*/
if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A || if (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A ||
stream->signal == SIGNAL_TYPE_DVI_SINGLE_LINK || stream->signal == SIGNAL_TYPE_DVI_SINGLE_LINK ||
stream->signal == SIGNAL_TYPE_DVI_DUAL_LINK) stream->signal == SIGNAL_TYPE_DVI_DUAL_LINK ||
stream->signal == SIGNAL_TYPE_DISPLAY_PORT)
tmds_present = true; tmds_present = true;
} }
......
...@@ -3602,29 +3602,12 @@ static bool dpcd_read_sink_ext_caps(struct dc_link *link) ...@@ -3602,29 +3602,12 @@ static bool dpcd_read_sink_ext_caps(struct dc_link *link)
bool dp_retrieve_lttpr_cap(struct dc_link *link) bool dp_retrieve_lttpr_cap(struct dc_link *link)
{ {
uint8_t lttpr_dpcd_data[6]; uint8_t lttpr_dpcd_data[6];
bool vbios_lttpr_enable = false; bool vbios_lttpr_enable = link->dc->caps.vbios_lttpr_enable;
bool vbios_lttpr_interop = false; bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;
struct dc_bios *bios = link->dc->ctx->dc_bios;
enum dc_status status = DC_ERROR_UNEXPECTED; enum dc_status status = DC_ERROR_UNEXPECTED;
bool is_lttpr_present = false; bool is_lttpr_present = false;
memset(lttpr_dpcd_data, '\0', sizeof(lttpr_dpcd_data)); memset(lttpr_dpcd_data, '\0', sizeof(lttpr_dpcd_data));
/* Query BIOS to determine if LTTPR functionality is forced on by system */
if (bios->funcs->get_lttpr_caps) {
enum bp_result bp_query_result;
uint8_t is_vbios_lttpr_enable = 0;
bp_query_result = bios->funcs->get_lttpr_caps(bios, &is_vbios_lttpr_enable);
vbios_lttpr_enable = (bp_query_result == BP_RESULT_OK) && !!is_vbios_lttpr_enable;
}
if (bios->funcs->get_lttpr_interop) {
enum bp_result bp_query_result;
uint8_t is_vbios_interop_enabled = 0;
bp_query_result = bios->funcs->get_lttpr_interop(bios, &is_vbios_interop_enabled);
vbios_lttpr_interop = (bp_query_result == BP_RESULT_OK) && !!is_vbios_interop_enabled;
}
/* /*
* Logic to determine LTTPR mode * Logic to determine LTTPR mode
......
...@@ -183,6 +183,8 @@ struct dc_caps { ...@@ -183,6 +183,8 @@ struct dc_caps {
unsigned int cursor_cache_size; unsigned int cursor_cache_size;
struct dc_plane_cap planes[MAX_PLANES]; struct dc_plane_cap planes[MAX_PLANES];
struct dc_color_caps color; struct dc_color_caps color;
bool vbios_lttpr_aware;
bool vbios_lttpr_enable;
}; };
struct dc_bug_wa { struct dc_bug_wa {
......
...@@ -464,7 +464,7 @@ void optc2_lock_doublebuffer_enable(struct timing_generator *optc) ...@@ -464,7 +464,7 @@ void optc2_lock_doublebuffer_enable(struct timing_generator *optc)
REG_UPDATE_2(OTG_GLOBAL_CONTROL1, REG_UPDATE_2(OTG_GLOBAL_CONTROL1,
MASTER_UPDATE_LOCK_DB_X, MASTER_UPDATE_LOCK_DB_X,
h_blank_start - 200 - 1, (h_blank_start - 200 - 1) / optc1->opp_count,
MASTER_UPDATE_LOCK_DB_Y, MASTER_UPDATE_LOCK_DB_Y,
v_blank_start - 1); v_blank_start - 1);
} }
......
...@@ -2617,6 +2617,26 @@ static bool dcn30_resource_construct( ...@@ -2617,6 +2617,26 @@ static bool dcn30_resource_construct(
dc->caps.color.mpc.ogam_rom_caps.hlg = 0; dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
dc->caps.color.mpc.ocsc = 1; dc->caps.color.mpc.ocsc = 1;
/* read VBIOS LTTPR caps */
{
if (ctx->dc_bios->funcs->get_lttpr_caps) {
enum bp_result bp_query_result;
uint8_t is_vbios_lttpr_enable = 0;
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
dc->caps.vbios_lttpr_enable = (bp_query_result == BP_RESULT_OK) && !!is_vbios_lttpr_enable;
}
if (ctx->dc_bios->funcs->get_lttpr_interop) {
enum bp_result bp_query_result;
uint8_t is_vbios_interop_enabled = 0;
bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop(ctx->dc_bios,
&is_vbios_interop_enabled);
dc->caps.vbios_lttpr_aware = (bp_query_result == BP_RESULT_OK) && !!is_vbios_interop_enabled;
}
}
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV) if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
dc->debug = debug_defaults_drv; dc->debug = debug_defaults_drv;
else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS) { else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS) {
......
...@@ -146,8 +146,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_03_soc = { ...@@ -146,8 +146,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_03_soc = {
.min_dcfclk = 500.0, /* TODO: set this to actual min DCFCLK */ .min_dcfclk = 500.0, /* TODO: set this to actual min DCFCLK */
.num_states = 1, .num_states = 1,
.sr_exit_time_us = 26.5, .sr_exit_time_us = 35.5,
.sr_enter_plus_exit_time_us = 31, .sr_enter_plus_exit_time_us = 40,
.urgent_latency_us = 4.0, .urgent_latency_us = 4.0,
.urgent_latency_pixel_data_only_us = 4.0, .urgent_latency_pixel_data_only_us = 4.0,
.urgent_latency_pixel_mixed_with_vm_data_us = 4.0, .urgent_latency_pixel_mixed_with_vm_data_us = 4.0,
......
...@@ -1968,6 +1968,22 @@ static bool dcn31_resource_construct( ...@@ -1968,6 +1968,22 @@ static bool dcn31_resource_construct(
dc->caps.color.mpc.ogam_rom_caps.hlg = 0; dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
dc->caps.color.mpc.ocsc = 1; dc->caps.color.mpc.ocsc = 1;
/* read VBIOS LTTPR caps */
{
if (ctx->dc_bios->funcs->get_lttpr_caps) {
enum bp_result bp_query_result;
uint8_t is_vbios_lttpr_enable = 0;
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
dc->caps.vbios_lttpr_enable = (bp_query_result == BP_RESULT_OK) && !!is_vbios_lttpr_enable;
}
/* interop bit is implicit */
{
dc->caps.vbios_lttpr_aware = true;
}
}
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV) if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
dc->debug = debug_defaults_drv; dc->debug = debug_defaults_drv;
else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS) { else if (dc->ctx->dce_environment == DCE_ENV_FPGA_MAXIMUS) {
......
...@@ -267,11 +267,13 @@ void dmub_dcn31_set_outbox1_rptr(struct dmub_srv *dmub, uint32_t rptr_offset) ...@@ -267,11 +267,13 @@ void dmub_dcn31_set_outbox1_rptr(struct dmub_srv *dmub, uint32_t rptr_offset)
bool dmub_dcn31_is_hw_init(struct dmub_srv *dmub) bool dmub_dcn31_is_hw_init(struct dmub_srv *dmub)
{ {
uint32_t is_hw_init; union dmub_fw_boot_status status;
uint32_t is_enable;
REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_hw_init); status.all = REG_READ(DMCUB_SCRATCH0);
REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_enable);
return is_hw_init != 0; return is_enable != 0 && status.bits.dal_fw;
} }
bool dmub_dcn31_is_supported(struct dmub_srv *dmub) bool dmub_dcn31_is_supported(struct dmub_srv *dmub)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "amdgpu_smu.h" #include "amdgpu_smu.h"
#define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF
#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x03 #define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x04
#define SMU13_DRIVER_IF_VERSION_ALDE 0x07 #define SMU13_DRIVER_IF_VERSION_ALDE 0x07
/* MP Apertures */ /* MP Apertures */
......
...@@ -138,7 +138,7 @@ void i915_globals_unpark(void) ...@@ -138,7 +138,7 @@ void i915_globals_unpark(void)
atomic_inc(&active); atomic_inc(&active);
} }
static void __exit __i915_globals_flush(void) static void __i915_globals_flush(void)
{ {
atomic_inc(&active); /* skip shrinking */ atomic_inc(&active); /* skip shrinking */
...@@ -148,7 +148,7 @@ static void __exit __i915_globals_flush(void) ...@@ -148,7 +148,7 @@ static void __exit __i915_globals_flush(void)
atomic_dec(&active); atomic_dec(&active);
} }
void __exit i915_globals_exit(void) void i915_globals_exit(void)
{ {
GEM_BUG_ON(atomic_read(&active)); GEM_BUG_ON(atomic_read(&active));
......
...@@ -1195,6 +1195,7 @@ static int __init i915_init(void) ...@@ -1195,6 +1195,7 @@ static int __init i915_init(void)
err = pci_register_driver(&i915_pci_driver); err = pci_register_driver(&i915_pci_driver);
if (err) { if (err) {
i915_pmu_exit(); i915_pmu_exit();
i915_globals_exit();
return err; return err;
} }
......
...@@ -422,7 +422,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) ...@@ -422,7 +422,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
#define GEN12_HCP_SFC_LOCK_ACK_BIT REG_BIT(1) #define GEN12_HCP_SFC_LOCK_ACK_BIT REG_BIT(1)
#define GEN12_HCP_SFC_USAGE_BIT REG_BIT(0) #define GEN12_HCP_SFC_USAGE_BIT REG_BIT(0)
#define GEN12_SFC_DONE(n) _MMIO(0x1cc00 + (n) * 0x100) #define GEN12_SFC_DONE(n) _MMIO(0x1cc000 + (n) * 0x1000)
#define GEN12_SFC_DONE_MAX 4 #define GEN12_SFC_DONE_MAX 4
#define RING_PP_DIR_BASE(base) _MMIO((base) + 0x228) #define RING_PP_DIR_BASE(base) _MMIO((base) + 0x228)
......
...@@ -203,6 +203,7 @@ static irqreturn_t handle_lcd_irq(struct drm_device *dev) ...@@ -203,6 +203,7 @@ static irqreturn_t handle_lcd_irq(struct drm_device *dev)
unsigned long status, val, val1; unsigned long status, val, val1;
int plane_id, dma0_state, dma1_state; int plane_id, dma0_state, dma1_state;
struct kmb_drm_private *kmb = to_kmb(dev); struct kmb_drm_private *kmb = to_kmb(dev);
u32 ctrl = 0;
status = kmb_read_lcd(kmb, LCD_INT_STATUS); status = kmb_read_lcd(kmb, LCD_INT_STATUS);
...@@ -227,6 +228,19 @@ static irqreturn_t handle_lcd_irq(struct drm_device *dev) ...@@ -227,6 +228,19 @@ static irqreturn_t handle_lcd_irq(struct drm_device *dev)
kmb_clr_bitmask_lcd(kmb, LCD_CONTROL, kmb_clr_bitmask_lcd(kmb, LCD_CONTROL,
kmb->plane_status[plane_id].ctrl); kmb->plane_status[plane_id].ctrl);
ctrl = kmb_read_lcd(kmb, LCD_CONTROL);
if (!(ctrl & (LCD_CTRL_VL1_ENABLE |
LCD_CTRL_VL2_ENABLE |
LCD_CTRL_GL1_ENABLE |
LCD_CTRL_GL2_ENABLE))) {
/* If no LCD layers are using DMA,
* then disable DMA pipelined AXI read
* transactions.
*/
kmb_clr_bitmask_lcd(kmb, LCD_CONTROL,
LCD_CTRL_PIPELINE_DMA);
}
kmb->plane_status[plane_id].disable = false; kmb->plane_status[plane_id].disable = false;
} }
} }
...@@ -411,10 +425,10 @@ static const struct drm_driver kmb_driver = { ...@@ -411,10 +425,10 @@ static const struct drm_driver kmb_driver = {
.fops = &fops, .fops = &fops,
DRM_GEM_CMA_DRIVER_OPS_VMAP, DRM_GEM_CMA_DRIVER_OPS_VMAP,
.name = "kmb-drm", .name = "kmb-drm",
.desc = "KEEMBAY DISPLAY DRIVER ", .desc = "KEEMBAY DISPLAY DRIVER",
.date = "20201008", .date = DRIVER_DATE,
.major = 1, .major = DRIVER_MAJOR,
.minor = 0, .minor = DRIVER_MINOR,
}; };
static int kmb_remove(struct platform_device *pdev) static int kmb_remove(struct platform_device *pdev)
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
#define KMB_MAX_HEIGHT 1080 /*Max height in pixels */ #define KMB_MAX_HEIGHT 1080 /*Max height in pixels */
#define KMB_MIN_WIDTH 1920 /*Max width in pixels */ #define KMB_MIN_WIDTH 1920 /*Max width in pixels */
#define KMB_MIN_HEIGHT 1080 /*Max height in pixels */ #define KMB_MIN_HEIGHT 1080 /*Max height in pixels */
#define DRIVER_DATE "20210223"
#define DRIVER_MAJOR 1
#define DRIVER_MINOR 1
#define KMB_LCD_DEFAULT_CLK 200000000 #define KMB_LCD_DEFAULT_CLK 200000000
#define KMB_SYS_CLK_MHZ 500 #define KMB_SYS_CLK_MHZ 500
......
...@@ -427,8 +427,14 @@ static void kmb_plane_atomic_update(struct drm_plane *plane, ...@@ -427,8 +427,14 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,
kmb_set_bitmask_lcd(kmb, LCD_CONTROL, ctrl); kmb_set_bitmask_lcd(kmb, LCD_CONTROL, ctrl);
/* FIXME no doc on how to set output format,these values are /* Enable pipeline AXI read transactions for the DMA
* taken from the Myriadx tests * after setting graphics layers. This must be done
* in a separate write cycle.
*/
kmb_set_bitmask_lcd(kmb, LCD_CONTROL, LCD_CTRL_PIPELINE_DMA);
/* FIXME no doc on how to set output format, these values are taken
* from the Myriadx tests
*/ */
out_format |= LCD_OUTF_FORMAT_RGB888; out_format |= LCD_OUTF_FORMAT_RGB888;
...@@ -526,6 +532,11 @@ struct kmb_plane *kmb_plane_init(struct drm_device *drm) ...@@ -526,6 +532,11 @@ struct kmb_plane *kmb_plane_init(struct drm_device *drm)
plane->id = i; plane->id = i;
} }
/* Disable pipeline AXI read transactions for the DMA
* prior to setting graphics layers
*/
kmb_clr_bitmask_lcd(kmb, LCD_CONTROL, LCD_CTRL_PIPELINE_DMA);
return primary; return primary;
cleanup: cleanup:
drmm_kfree(drm, plane); drmm_kfree(drm, plane);
......
...@@ -492,7 +492,7 @@ struct vmw_private { ...@@ -492,7 +492,7 @@ struct vmw_private {
resource_size_t vram_start; resource_size_t vram_start;
resource_size_t vram_size; resource_size_t vram_size;
resource_size_t prim_bb_mem; resource_size_t prim_bb_mem;
void __iomem *rmmio; u32 __iomem *rmmio;
u32 *fifo_mem; u32 *fifo_mem;
resource_size_t fifo_mem_size; resource_size_t fifo_mem_size;
uint32_t fb_max_width; uint32_t fb_max_width;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment