Re: [PATCH v8 3/6] drm/i915/guc: Implement dynamic GuC WOPCM offset and size

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

 



On 02/07/2018 09:24 AM, Michal Wajdeczko wrote:
 int guc_wopcm_check_huc_fw_size(struct guc_wopcm *wopcm, u32 huc_size)

patch 1/6 & 2/6 are only for some code movings. but have to make it clean.
but I do not need this func anymore:o)

so maybe part of these code movement was unnecessary, and affected
code can be replaced directly in this patch ?

That's how I did it before!:-) but I learned my lesson that I've to keep every change/patch clear enough or readers will get confused;-) Actually, I was struggling on this a bit, but it's clearer to have to valid bit in this
struct instead of only checking offset/size/top. And now that we have valid bit

But if check_hw_restrictions() fails we will return error and we should
never use this struct, so this 'valid' bit now seems more redundant.

In current code, we do verify the ggtt offset against wopcm top in our current code which means current code won't trust the fact that ggtt offset would never be used after uc/guc init failed. This is the reason for this valid bit - I won't assume the ggtt_offset would never be called even if the uc/guc_init returned failure either, since it would be weird if we don't check the valid bit
in guc_ggtt_offset() but still verify the offset against the wopcm top.

Regards,
-Jackie

_______________________________________________
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