diff options
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_panic.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/panthor/panthor_mmu.c | 10 | 
4 files changed, 24 insertions, 5 deletions
| diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c index 3279f347660c..bcb296a954f2 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c @@ -287,6 +287,9 @@ void dcn401_init_hw(struct dc *dc)  		 */  		struct dc_link *link = dc->links[i]; +		if (link->ep_type != DISPLAY_ENDPOINT_PHY) +			continue; +  		link->link_enc->funcs->hw_init(link->link_enc);  		/* Check for enabled DIG to identify enabled display */ diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h b/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h index 41c76ba9ba56..62a39204fe0b 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h @@ -44,7 +44,13 @@   */  #define MAX_PIPES 6  #define MAX_PHANTOM_PIPES (MAX_PIPES / 2) -#define MAX_LINKS (MAX_PIPES * 2 +2) + +#define MAX_DPIA 6 +#define MAX_CONNECTOR 6 +#define MAX_VIRTUAL_LINKS 4 + +#define MAX_LINKS (MAX_DPIA + MAX_CONNECTOR + MAX_VIRTUAL_LINKS) +  #define MAX_DIG_LINK_ENCODERS 7  #define MAX_DWB_PIPES	1  #define MAX_HPO_DP2_ENCODERS	4 diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index f128d345b16d..0aa87eafdacd 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -306,6 +306,9 @@ static void drm_panic_logo_rect(struct drm_rect *rect, const struct font_desc *f  static void drm_panic_logo_draw(struct drm_scanout_buffer *sb, struct drm_rect *rect,  				const struct font_desc *font, u32 fg_color)  { +	if (rect->x2 > sb->width || rect->y2 > sb->height) +		return; +  	if (logo_mono)  		drm_panic_blit(sb, rect, logo_mono->data,  			       DIV_ROUND_UP(drm_rect_width(rect), 8), 1, fg_color); @@ -615,7 +618,10 @@ static int _draw_panic_static_qr_code(struct drm_scanout_buffer *sb)  	pr_debug("QR width %d and scale %d\n", qr_width, scale);  	r_qr_canvas = DRM_RECT_INIT(0, 0, qr_canvas_width * scale, qr_canvas_width * scale); -	v_margin = (sb->height - drm_rect_height(&r_qr_canvas) - drm_rect_height(&r_msg)) / 5; +	v_margin = sb->height - drm_rect_height(&r_qr_canvas) - drm_rect_height(&r_msg); +	if (v_margin < 0) +		return -ENOSPC; +	v_margin /= 5;  	drm_rect_translate(&r_qr_canvas, (sb->width - r_qr_canvas.x2) / 2, 2 * v_margin);  	r_qr = DRM_RECT_INIT(r_qr_canvas.x1 + QR_MARGIN * scale, r_qr_canvas.y1 + QR_MARGIN * scale, diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/panthor/panthor_mmu.c index b57824abeb9e..2214dbf472fa 100644 --- a/drivers/gpu/drm/panthor/panthor_mmu.c +++ b/drivers/gpu/drm/panthor/panthor_mmu.c @@ -1168,10 +1168,14 @@ panthor_vm_op_ctx_prealloc_vmas(struct panthor_vm_op_ctx *op_ctx)  		break;  	case DRM_PANTHOR_VM_BIND_OP_TYPE_UNMAP: -		/* Partial unmaps might trigger a remap with either a prev or a next VA, -		 * but not both. +		/* Two VMAs can be needed for an unmap, as an unmap can happen +		 * in the middle of a drm_gpuva, requiring a remap with both +		 * prev & next VA. Or an unmap can span more than one drm_gpuva +		 * where the first and last ones are covered partially, requring +		 * a remap for the first with a prev VA and remap for the last +		 * with a next VA.  		 */ -		vma_count = 1; +		vma_count = 2;  		break;  	default: | 
