APPLIED/cmt: [PATCH 0/3] [SRU][Bionic] drm/i915: Fix softpin on 32bit

Timo Aaltonen tjaalton at ubuntu.com
Mon Aug 12 09:44:15 UTC 2019


On 12.8.2019 11.04, Kleber Souza wrote:
> On 8/12/19 4:31 AM, Khaled Elmously wrote:
>> Applied to Bionic. 
>>
>> Timo, note that there was a conflict with patch 2/3.
>>
>> The first chunk of delta in drivers/gpu/drm/i915/gvt/cmd_parser.c expects the line:
>>
>>
>>
>> if (guest_gma >= GTT_PAGE_SIZE / sizeof(u64)) {
>>
>>
>>
>> but in bionic/master-next, that line is actually:
>>
>>
>> if (guest_gma >= GTT_PAGE_SIZE) {
>>
>>
>>
>>
>> I went ahead and replaced the line anyway with:
>>  
>>
>> if (guest_gma >= I915_GTT_PAGE_SIZE / sizeof(u64)) {
> 
> Hi Khaled,
> 
> If you make any change when applying a patch from the mailing-list,
> please state the reason above your s-o-b line. If we have an issue
> with the code in the future we can trace back the changes and
> understand the rationale behind it.
> 
> The removal of the division for "sizeof(u64)" has been explicitly done
> in the meantime with the backport of the following commit applied as
> stable update:
> 
> drm/i915/gvt: Fix MI_FLUSH_DW parsing with correct index check
> 
> which is commit 13bcb80b7ee79431fce361e060611134cb19e209 upstream.
> 
> So adding back the division functionally reverts this commit. Also,
> it was applied upstream after "drm/i915/gvt: Use I915_GTT_PAGE_SIZE"
> and the change it makes is:
> 
>         if (index_mode) {
> -               if (guest_gma >= I915_GTT_PAGE_SIZE / sizeof(u64)) {
> +               if (guest_gma >= I915_GTT_PAGE_SIZE) {
>                         ret = -EFAULT;
>                         goto err;
>                 }
> 
> so I believe we should stick to what Patch 2/3 does, just replacing
> GTT_PAGE_SIZE by I915_GTT_PAGE_SIZE, which end result would be
> exactly what's upstream in rev 9556e1188892.
> 
> I will amend this commit on master-next to fix it.
> 
> 
> Thanks,
> Kleber

Right, I based these on -56.62 and not master-next, because they were
tested that way. Should work just the same with the new rebase to stable.



-- 
t



More information about the kernel-team mailing list