diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-01 11:26:46 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-01 11:26:46 -0700 | 
| commit | 477f70cd2a67904e04c2c2b9bd0fa2e95222f2f6 (patch) | |
| tree | 1897dd1de49e1ea24897163533e2d8ead5dad0ad /drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | |
| parent | 835d31d319d9c8c4eb6cac074643360ba0ecab10 (diff) | |
| parent | 8f0284f190e6a0aa09015090568c03f18288231a (diff) | |
Merge tag 'drm-next-2021-08-31-1' of git://anongit.freedesktop.org/drm/drm
Pull drm updates from Dave Airlie:
 "Highlights:
   - i915 has seen a lot of refactoring and uAPI cleanups due to a
     change in the upstream direction going forward
     This has all been audited with known userspace, but there may be
     some pitfalls that were missed.
   - i915 now uses common TTM to enable discrete memory on DG1/2 GPUs
   - i915 enables Jasper and Elkhart Lake by default and has preliminary
     XeHP/DG2 support
   - amdgpu adds support for Cyan Skillfish
   - lots of implicit fencing rules documented and fixed up in drivers
   - msm now uses the core scheduler
   - the irq midlayer has been removed for non-legacy drivers
   - the sysfb code now works on more than x86.
  Otherwise the usual smattering of stuff everywhere, panels, bridges,
  refactorings.
  Detailed summary:
  core:
   - extract i915 eDP backlight into core
   - DP aux bus support
   - drm_device.irq_enabled removed
   - port drivers to native irq interfaces
   - export gem shadow plane handling for vgem
   - print proper driver name in framebuffer registration
   - driver fixes for implicit fencing rules
   - ARM fixed rate compression modifier added
   - updated fb damage handling
   - rmfb ioctl logging/docs
   - drop drm_gem_object_put_locked
   - define DRM_FORMAT_MAX_PLANES
   - add gem fb vmap/vunmap helpers
   - add lockdep_assert(once) helpers
   - mark drm irq midlayer as legacy
   - use offset adjusted bo mapping conversion
  vgaarb:
   - cleanups
  fbdev:
   - extend efifb handling to all arches
   - div by 0 fixes for multiple drivers
  udmabuf:
   - add hugepage mapping support
  dma-buf:
   - non-dynamic exporter fixups
   - document implicit fencing rules
  amdgpu:
   - Initial Cyan Skillfish support
   - switch virtual DCE over to vkms based atomic
   - VCN/JPEG power down fixes
   - NAVI PCIE link handling fixes
   - AMD HDMI freesync fixes
   - Yellow Carp + Beige Goby fixes
   - Clockgating/S0ix/SMU/EEPROM fixes
   - embed hw fence in job
   - rework dma-resv handling
   - ensure eviction to system ram
  amdkfd:
   - uapi: SVM address range query added
   - sysfs leak fix
   - GPUVM TLB optimizations
   - vmfault/migration counters
  i915:
   - Enable JSL and EHL by default
   - preliminary XeHP/DG2 support
   - remove all CNL support (never shipped)
   - move to TTM for discrete memory support
   - allow mixed object mmap handling
   - GEM uAPI spring cleaning
       - add I915_MMAP_OBJECT_FIXED
       - reinstate ADL-P mmap ioctls
       - drop a bunch of unused by userspace features
       - disable and remove GPU relocations
   - revert some i915 misfeatures
   - major refactoring of GuC for Gen11+
   - execbuffer object locking separate step
   - reject caching/set-domain on discrete
   - Enable pipe DMC loading on XE-LPD and ADL-P
   - add PSF GV point support
   - Refactor and fix DDI buffer translations
   - Clean up FBC CFB allocation code
   - Finish INTEL_GEN() and friends macro conversions
  nouveau:
   - add eDP backlight support
   - implicit fence fix
  msm:
   - a680/7c3 support
   - drm/scheduler conversion
  panfrost:
   - rework GPU reset
  virtio:
   - fix fencing for planes
  ast:
   - add detect support
  bochs:
   - move to tiny GPU driver
  vc4:
   - use hotplug irqs
   - HDMI codec support
  vmwgfx:
   - use internal vmware device headers
  ingenic:
   - demidlayering irq
  rcar-du:
   - shutdown fixes
   - convert to bridge connector helpers
  zynqmp-dsub:
   - misc fixes
  mgag200:
   - convert PLL handling to atomic
  mediatek:
   - MT8133 AAL support
   - gem mmap object support
   - MT8167 support
  etnaviv:
   - NXP Layerscape LS1028A SoC support
   - GEM mmap cleanups
  tegra:
   - new user API
  exynos:
   - missing unlock fix
   - build warning fix
   - use refcount_t"
* tag 'drm-next-2021-08-31-1' of git://anongit.freedesktop.org/drm/drm: (1318 commits)
  drm/amd/display: Move AllowDRAMSelfRefreshOrDRAMClockChangeInVblank to bounding box
  drm/amd/display: Remove duplicate dml init
  drm/amd/display: Update bounding box states (v2)
  drm/amd/display: Update number of DCN3 clock states
  drm/amdgpu: disable GFX CGCG in aldebaran
  drm/amdgpu: Clear RAS interrupt status on aldebaran
  drm/amdgpu: Add support for RAS XGMI err query
  drm/amdkfd: Account for SH/SE count when setting up cu masks.
  drm/amdgpu: rename amdgpu_bo_get_preferred_pin_domain
  drm/amdgpu: drop redundant cancel_delayed_work_sync call
  drm/amdgpu: add missing cleanups for more ASICs on UVD/VCE suspend
  drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
  drm/amdkfd: map SVM range with correct access permission
  drm/amdkfd: check access permisson to restore retry fault
  drm/amdgpu: Update RAS XGMI Error Query
  drm/amdgpu: Add driver infrastructure for MCA RAS
  drm/amd/display: Add Logging for HDMI color depth information
  drm/amd/amdgpu: consolidate PSP TA init shared buf functions
  drm/amd/amdgpu: add name field back to ras_common_if
  drm/amdgpu: Fix build with missing pm_suspend_target_state module export
  ...
Diffstat (limited to 'drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 59 | 
1 files changed, 36 insertions, 23 deletions
| diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h index 7fafb8d6c1da..7b684e7f60df 100644 --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h @@ -23,8 +23,8 @@   *   */ -#ifndef _DMUB_CMD_H_ -#define _DMUB_CMD_H_ +#ifndef DMUB_CMD_H +#define DMUB_CMD_H  #if defined(_TEST_HARNESS) || defined(FPGA_USB4)  #include "dmub_fw_types.h" @@ -47,10 +47,10 @@  /* Firmware versioning. */  #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0xf3da2b656 +#define DMUB_FW_VERSION_GIT_HASH 0x7383caadc  #define DMUB_FW_VERSION_MAJOR 0  #define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 71 +#define DMUB_FW_VERSION_REVISION 79  #define DMUB_FW_VERSION_TEST 0  #define DMUB_FW_VERSION_VBIOS 0  #define DMUB_FW_VERSION_HOTFIX 0 @@ -322,6 +322,10 @@ union dmub_fw_boot_status {  		uint32_t mailbox_rdy : 1; /**< 1 if mailbox ready */  		uint32_t optimized_init_done : 1; /**< 1 if optimized init done */  		uint32_t restore_required : 1; /**< 1 if driver should call restore */ +		uint32_t defer_load : 1; /**< 1 if VBIOS data is deferred programmed */ +		uint32_t reserved : 1; +		uint32_t detection_required: 1; /**<  if detection need to be triggered by driver */ +  	} bits; /**< status bits */  	uint32_t all; /**< 32-bit access to status bits */  }; @@ -334,6 +338,8 @@ enum dmub_fw_boot_status_bit {  	DMUB_FW_BOOT_STATUS_BIT_MAILBOX_READY = (1 << 1), /**< 1 if mailbox ready */  	DMUB_FW_BOOT_STATUS_BIT_OPTIMIZED_INIT_DONE = (1 << 2), /**< 1 if init done */  	DMUB_FW_BOOT_STATUS_BIT_RESTORE_REQUIRED = (1 << 3), /**< 1 if driver should call restore */ +	DMUB_FW_BOOT_STATUS_BIT_DEFERRED_LOADED = (1 << 4), /**< 1 if VBIOS data is deferred programmed */ +	DMUB_FW_BOOT_STATUS_BIT_DETECTION_REQUIRED = (1 << 6), /**< 1 if detection need to be triggered by driver*/  };  /* Register bit definition for SCRATCH5 */ @@ -352,7 +358,7 @@ enum dmub_lvtma_status_bit {  };  /** - * union dmub_fw_boot_options - Boot option definitions for SCRATCH15 + * union dmub_fw_boot_options - Boot option definitions for SCRATCH14   */  union dmub_fw_boot_options {  	struct { @@ -363,7 +369,10 @@ union dmub_fw_boot_options {  		uint32_t disable_clk_gate: 1; /**< 1 if clock gating should be disabled */  		uint32_t skip_phy_init_panel_sequence: 1; /**< 1 to skip panel init seq */  		uint32_t z10_disable: 1; /**< 1 to disable z10 */ -		uint32_t reserved : 25; /**< reserved */ +		uint32_t reserved2: 1; /**< reserved for an unreleased feature */ +		uint32_t reserved_unreleased1: 1; /**< reserved for an unreleased feature */ +		uint32_t invalid_vbios_data: 1; /**< 1 if VBIOS data table is invalid */ +		uint32_t reserved : 23; /**< reserved */  	} bits; /**< boot bits */  	uint32_t all; /**< 32-bit access to bits */  }; @@ -485,6 +494,11 @@ enum dmub_gpint_command {  	 * RETURN: PSR residency in milli-percent.  	 */  	DMUB_GPINT__PSR_RESIDENCY = 9, + +	/** +	 * DESC: Notifies DMCUB detection is done so detection required can be cleared. +	 */ +	DMUB_GPINT__NOTIFY_DETECTION_DONE = 12,  };  /** @@ -1411,6 +1425,10 @@ struct dmub_cmd_psr_copy_settings_data {  	 * Currently the support is only for 0 or 1  	 */  	uint8_t panel_inst; +	/** +	 * Explicit padding to 4 byte boundary. +	 */ +	uint8_t pad3[4];  };  /** @@ -1435,7 +1453,7 @@ struct dmub_cmd_psr_set_level_data {  	 * 16-bit value dicated by driver that will enable/disable different functionality.  	 */  	uint16_t psr_level; -		/** +	/**  	 * PSR control version.  	 */  	uint8_t cmd_version; @@ -2467,16 +2485,14 @@ static inline bool dmub_rb_full(struct dmub_rb *rb)  static inline bool dmub_rb_push_front(struct dmub_rb *rb,  				      const union dmub_rb_cmd *cmd)  { -	uint64_t volatile *dst = (uint64_t volatile *)(rb->base_address) + rb->wrpt / sizeof(uint64_t); -	const uint64_t *src = (const uint64_t *)cmd; -	uint8_t i; +	uint8_t *dst = (uint8_t *)(rb->base_address) + rb->wrpt; +	const uint8_t *src = (const uint8_t *)cmd;  	if (dmub_rb_full(rb))  		return false;  	// copying data -	for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++) -		*dst++ = *src++; +	dmub_memcpy(dst, src, DMUB_RB_CMD_SIZE);  	rb->wrpt += DMUB_RB_CMD_SIZE; @@ -2498,7 +2514,7 @@ static inline bool dmub_rb_out_push_front(struct dmub_rb *rb,  				      const union dmub_rb_out_cmd *cmd)  {  	uint8_t *dst = (uint8_t *)(rb->base_address) + rb->wrpt; -	const uint8_t *src = (uint8_t *)cmd; +	const uint8_t *src = (const uint8_t *)cmd;  	if (dmub_rb_full(rb))  		return false; @@ -2583,18 +2599,16 @@ static inline bool dmub_rb_peek_offset(struct dmub_rb *rb,   * @return false otherwise   */  static inline bool dmub_rb_out_front(struct dmub_rb *rb, -				 union dmub_rb_out_cmd  *cmd) +				 union dmub_rb_out_cmd *cmd)  { -	const uint64_t volatile *src = (const uint64_t volatile *)(rb->base_address) + rb->rptr / sizeof(uint64_t); -	uint64_t *dst = (uint64_t *)cmd; -	uint8_t i; +	const uint8_t *src = (const uint8_t *)(rb->base_address) + rb->rptr; +	uint8_t *dst = (uint8_t *)cmd;  	if (dmub_rb_empty(rb))  		return false;  	// copying data -	for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++) -		*dst++ = *src++; +	dmub_memcpy(dst, src, DMUB_RB_CMD_SIZE);  	return true;  } @@ -2629,15 +2643,14 @@ static inline bool dmub_rb_pop_front(struct dmub_rb *rb)   */  static inline void dmub_rb_flush_pending(const struct dmub_rb *rb)  { +	uint8_t buf[DMUB_RB_CMD_SIZE];  	uint32_t rptr = rb->rptr;  	uint32_t wptr = rb->wrpt;  	while (rptr != wptr) { -		uint64_t volatile *data = (uint64_t volatile *)rb->base_address + rptr / sizeof(uint64_t); -		uint8_t i; +		const uint8_t *data = (const uint8_t *)rb->base_address + rptr; -		for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++) -			*data++; +		dmub_memcpy(buf, data, DMUB_RB_CMD_SIZE);  		rptr += DMUB_RB_CMD_SIZE;  		if (rptr >= rb->capacity) | 
