Re: [PATCH v3 11/17] drm/i915: Expand error state's address width to 64b

Michel Thierry
2015-07-07T13:50:05Z

On 7/7/2015 1:53 PM, Goel, Akash wrote:
> On 7/1/2015 8:57 PM, Michel Thierry wrote:
>> @@ -476,13 +477,13 @@ int i915_error_state_to_str(struct
>> drm_i915_error_state_buf *m,
>> if ((obj = error->ring[i].ctx)) {
>> err_printf(m, "%s --- HW Context = 0x%08x\n",
>> dev_priv->ring[i].name,
>> - obj->gtt_offset);
>> + lower_32_bits(obj->gtt_offset));
>> print_error_obj(m, obj);
>> }
>> }
>>
>> if ((obj = error->semaphore_obj)) {
>> - err_printf(m, "Semaphore page = 0x%08x\n", obj->gtt_offset);
>> + err_printf(m, "Semaphore page = 0x%016llx\n", obj->gtt_offset);
>
> Can the 'lower_32_bits' be used for the semaphore object also. Its
> mapped into GGTT during ring init time, so may not have an offset > 4GB.
>
Makes sense, will change to:
if ((obj = error->semaphore_obj)) {
err_printf(m, "Semaphore page = 0x%08x\n",
lower_32_bits(obj->gtt_offset));

>> for (elt = 0; elt < PAGE_SIZE/16; elt += 4) {
>> err_printf(m, "[%04x] %08x %08x %08x %08x\n",
>> elt * 4,
>> @@ -590,7 +591,7 @@ i915_error_object_create(struct drm_i915_private
>> *dev_priv,
>> int num_pages;
>> bool use_ggtt;
>> int i = 0;
>> - u32 reloc_offset;
>> + u64 reloc_offset;
>>
>> if (src == NULL || src->pages == NULL)
>> return NULL;
>>