Re: [PATCH 02/13] drm/i915: Implement command buffer parsing logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Feb 2014, bradley.d.volkin@xxxxxxxxx wrote:
> +static u32 gen7_render_get_cmd_length_mask(u32 cmd_header)
> +{
> +	u32 client = (cmd_header & INSTR_CLIENT_MASK) >> INSTR_CLIENT_SHIFT;
> +	u32 subclient =
> +		(cmd_header & INSTR_SUBCLIENT_MASK) >> INSTR_SUBCLIENT_SHIFT;
> +
> +	if (client == INSTR_MI_CLIENT)
> +		return 0x3F;
> +	else if (client == INSTR_RC_CLIENT) {
> +		if (subclient == INSTR_MEDIA_SUBCLIENT)
> +			return 0xFFFF;
> +		else
> +			return 0xFF;
> +	}
> +
> +	DRM_DEBUG_DRIVER("CMD: Abnormal rcs cmd length! 0x%08X\n", cmd_header);
> +	return 0;
> +}
> +
> +static u32 gen7_bsd_get_cmd_length_mask(u32 cmd_header)
> +{
> +	u32 client = (cmd_header & INSTR_CLIENT_MASK) >> INSTR_CLIENT_SHIFT;
> +	u32 subclient =
> +		(cmd_header & INSTR_SUBCLIENT_MASK) >> INSTR_SUBCLIENT_SHIFT;
> +
> +	if (client == INSTR_MI_CLIENT)
> +		return 0x3F;
> +	else if (client == INSTR_RC_CLIENT) {
> +		if (subclient == INSTR_MEDIA_SUBCLIENT)
> +			return 0xFFF;

Should this be 0xffff like in gen7_render_get_cmd_length_mask()?

Jani.

> +		else
> +			return 0xFF;
> +	}
> +
> +	DRM_DEBUG_DRIVER("CMD: Abnormal bsd cmd length! 0x%08X\n", cmd_header);
> +	return 0;
> +}

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux