[Intel-gfx] [PATCH v5] drm/i915: Introduce concept of a sub-platform
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Fri Mar 15 17:36:22 UTC 2019
On 15/03/2019 17:28, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-03-15 17:09:28)
>> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
>> index 3d8020888604..e3360a31f8d3 100644
>> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
>> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
>> @@ -677,6 +677,7 @@ static void __err_print_to_sgl(struct drm_i915_error_state_buf *m,
>> err_printf(m, "Reset count: %u\n", error->reset_count);
>> err_printf(m, "Suspend count: %u\n", error->suspend_count);
>> err_printf(m, "Platform: %s\n", intel_platform_name(error->device_info.platform));
>> + err_printf(m, "Subplatform: 0x%x\n", intel_subplatform(m->i915));
>
> We didn't take a copy of the runtime_info? Ww should have done at least,
> that's even more volatile than device_info.
>
> It'll do for now, but would be nicer if RUNTIME_INFO(i915) wasn't baked
> so hard into the subplatform :)
Could do yeah.
>> +void intel_device_info_subplatform_init(struct drm_i915_private *i915)
>> +{
>> + const unsigned int pi =
>> + __platform_mask_index(i915, INTEL_INFO(i915)->platform);
>> + const unsigned int pb =
>> + __platform_mask_bit(i915, INTEL_INFO(i915)->platform);
>> + u16 devid = INTEL_DEVID(i915);
>> + u32 mask = 0;
>> +
>> + RUNTIME_INFO(i915)->platform_mask[pi] = BIT(pb);
>> +
>> + if (IS_PINEVIEW(i915)) {
>> + if (devid == 0xa001)
>> + mask |= BIT(INTEL_SUBPLATFORM_PINEVIEW_G);
>> + else if (devid == 0xa011)
>> + mask |= BIT(INTEL_SUBPLATFORM_PINEVIEW_M);
>
> I take it, leaving is-mobile conversion for the display gurus?
Ville said it will be hard so I did not even look. :) Okay, it doesn't
seem that hard.. but definitely wouldn't stuff it into this patch.
Regards,
Tvrtko
More information about the Intel-gfx
mailing list