Re: [PATCH] nouveau: bring back legacy mmap handler

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

 



On 16 December 2014 at 18:56, Daniel Vetter <daniel@xxxxxxxx> wrote:
> On Tue, Dec 16, 2014 at 04:34:39PM +1000, Dave Airlie wrote:
>> From: Dave Airlie <airlied@xxxxxxxxxx>
>>
>> nouveau userspace back at 1.0.1 used to call the X server
>> DRIOpenDRMMaster interface even for DRI2 (doh!), this attempts
>> to map the sarea and fails if it can't.
>>
>> Since 884c6dabb0eafe7227f099c9e78e514191efaf13 from Daniel,
>> this fails, but only ancient drivers would see it.
>>
>> Revert the nouveau bits of that fix, and hope it works.
>>
>> Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
>
> Argh, sorry for missing that in my git history digging.
>
> Acked-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
>
> Now curious question: Would return 0 also work? As long as userspace only
> cares about the errno of the ioctl call and doesn't actually look at the
> sarea itself we could keep the cake and eat it, too. I've used a similar
> trick in legacy context code, again because old nouveau had copypasta from
> dri1, but only cared about the errno and not whether the contexts actually
> did anything useful.

    if (drmMap(tmp.drmFD, tmp.hLSAREA, sAreaSize,
               (drmAddressPtr) (&tmp.pLSAREA)) < 0) {
        DRIDrvMsg(-1, X_INFO, "[drm] Mapping SAREA for DRM lock failed.\n");
        tmp.pLSAREA = NULL;
        goto out_err;
    }

    memset(tmp.pLSAREA, 0, sAreaSize);


seems unlikely return 0 will work!

Dave.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux