Re: [Mesa-dev] [PATCH] gallium/winsys/kms: don't unmap what wasn't mapped

2018-08-21 Thread Ray Strode
hi, On Thu, Aug 16, 2018, 4:48 PM Lepton Wu wrote: > > Does https://patchwork.freedesktop.org/patch/238931/ already fix this? > What's the advantage to use MAP_FAILED instead of NULL? yea that patch should work fine, i didnt see it go by. the advantage of MAP_FAILED is it's more fault

Re: [Mesa-dev] [PATCH] gallium/winsys/kms: don't unmap what wasn't mapped

2018-08-17 Thread Emil Velikov
On 16 August 2018 at 21:37, Ray Strode wrote: > From: Ray Strode > > At the moment, depending on pipe transfer flags, the dumb > buffer map address can end up at either kms_sw_dt->ro_mapped > or kms_sw_dt->mapped. > > When it's time to unmap the dumb buffer, both locations get unmapped, > even

Re: [Mesa-dev] [PATCH] gallium/winsys/kms: don't unmap what wasn't mapped

2018-08-16 Thread Lepton Wu
On Thu, Aug 16, 2018 at 1:37 PM Ray Strode wrote: > > From: Ray Strode > > At the moment, depending on pipe transfer flags, the dumb > buffer map address can end up at either kms_sw_dt->ro_mapped > or kms_sw_dt->mapped. > > When it's time to unmap the dumb buffer, both locations get unmapped, >

[Mesa-dev] [PATCH] gallium/winsys/kms: don't unmap what wasn't mapped

2018-08-16 Thread Ray Strode
From: Ray Strode At the moment, depending on pipe transfer flags, the dumb buffer map address can end up at either kms_sw_dt->ro_mapped or kms_sw_dt->mapped. When it's time to unmap the dumb buffer, both locations get unmapped, even though one is probably initialized to 0. That leads to the