Re: [PATCH 2/2] drm/i915: Test all fw tables during mock selftests

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

 



On ke, 2016-12-07 at 18:52 +0000, Chris Wilson wrote:
> In addition to just testing the fw table we load, during the initial
> mock testing we can test that all tables are valid (so the testing is
> not limited to just the platforms that load that particular table).
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

<SNIP>

> +static int intel_fw_table_check(const struct intel_forcewake_range *ranges,
> +				unsigned int num_ranges,
> +				int gen)
>  {
> -	const struct intel_forcewake_range *ranges;
> -	unsigned int num_ranges, i;
> +	unsigned int i;
>  	s32 prev;
>  
> -	ranges = i915->uncore.fw_domains_table;
> -	if (!ranges)
> -		return 0;
> -
> -	num_ranges = i915->uncore.fw_domains_table_entries;
>  	for (i = 0, prev = -1; i < num_ranges; i++, ranges++) {
>  		/* Check that the tabke is watertight */

s/tabke/table/

>  int intel_uncore_late_selftests(struct drm_i915_private *i915)
>  {
>  	int err;
>  
> -	err = intel_fw_table_check(i915);
> +	/* Confirm the table we load is still valid */
> +	err = intel_fw_table_check(i915->uncore.fw_domains_table,
> +				   i915->uncore.fw_domains_table_entries,
> +				   INTEL_GEN(i915));
>  	if (err)
>  		return err;

Maybe the mock test should skip .gen == INTEL_GEN(i915) to avoid
duplicate coverage on full run.
 
Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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