Code Monkey home page Code Monkey logo

Comments (10)

Cloudef avatar Cloudef commented on July 17, 2024

Sounds ok. Not sure about the auto-detection. It's not hard to export WLC_BUFFER_API=EGL in env. But if you think it is worth it, go for it.

from wlc.

ddevault avatar ddevault commented on July 17, 2024

👍 for auto-detection or we're gonna get a truckload of annoying support requests

from wlc.

vially avatar vially commented on July 17, 2024

@Cloudef Great. In that case I'll try to prepare a PR tomorrow if I'll have time.

@SirCmpwn If you're okay with it I'll mostly just copy-paste and adapt your detect_proprietary function. But isn't there a C function somewhere in the standard library which does what read_line does so I don't have to copy that too? (I'm asking because I don't know C and that function seems generic enough that it might be in the standard library).

from wlc.

ddevault avatar ddevault commented on July 17, 2024

No, there's not.

from wlc.

Drakulix avatar Drakulix commented on July 17, 2024

If you are going to do auto-detection you should do it the right way.

Checking the module does not help at all on systems were multiple cards are present and may break systems, that currently work just fine, where the card actually used by wlc is supporting the GBM buffers.

I do not know, whats the best way to get the loaded module of a device in code (probably via udev), but you can find it out quite easily with some shell commands, so I should not be too difficult.

Assuming the device used is /dev/dri/card0 (which is default, if I am not mistaken, unless WLC_DRM_DEVICE is set):

$ udevadm info --query=all -n /dev/dri/card0 | grep DEVPATH
E: DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
$ readlink /sys/devices/pci0000:00/0000:00:02.0/drm/card0/device/driver
../../../bus/pci/drivers/i915

The crud detect_proprietary function was fine for a warning because it was not affecting functionality, but please don't break this for some existing users. Not everybody just has a single graphics card.

EDIT: I know I can always just set WLC_BUFFER_API, but seeing @SirCmpwn is already concerned about support requests, so...

from wlc.

ddevault avatar ddevault commented on July 17, 2024

Should dig into udev and see how it does that, rather than depend on udev specifics.

from wlc.

Drakulix avatar Drakulix commented on July 17, 2024

Right, that was just a quick example.

from wlc.

vially avatar vially commented on July 17, 2024

I took a stab at it in #248 using the drmGetVersion function which seems to return the driver used by the DRM device.

@Drakulix @SirCmpwn Should that be robust enough? Do you know of any scenarios for which that doesn't work reliably?

from wlc.

Drakulix avatar Drakulix commented on July 17, 2024

If there is any, this only should be relevant for devices using nvidia-drm, so at least my original point cannot be relevant anymore and I cannot think of any more scenarios.

Thanks for figuring out how to do this! Highly appreciated.

from wlc.

vially avatar vially commented on July 17, 2024

Fixed in a7a3db8

from wlc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.