Ah, is this something new or did I just completely miss it when working
on FreeBSD?
CI on mailing list patches was down for a moment, but here is a manual
rerun on alpine: https://builds.sr.ht/~kennylevinsen/job/895142 - fails
on check-format.
On Wed, Nov 23 2022 at 02:12:42 AM +00:00:00, ~jrtc27
<jrtc27@git.sr.ht> wrote:
> +#ifdef __FreeBSD__> + /* Some drivers have /dev/dri/X symlinked to /dev/drm/X */> + if (STR_HAS_PREFIX("/dev/drm/", path))> + return 1;> +#endif
I think it would be much more readable if left as two flat #if's like
before but with the new code added to the freebsd version, even if it
leads to a duplicated check for /dev/dri. #ifdefs are not great for
readability, nested #ifdefs even less so.
On 30 Nov 2022, at 19:33, Kenny Levinsen <kl@kl.wtf> wrote:
> > Ah, is this something new or did I just completely miss it when working on FreeBSD?
The dam-subtree drivers are used for various Arm-based SoCs, though I think the Panfrost GPU driver might be the only one where you’d actually be able to do more than get a video console (what we’re using). Intel/AMD/Nvidia are still in drm-kmod and as far as I know haven’t changed behaviour.
> CI on mailing list patches was down for a moment, but here is a manual rerun on alpine: https://builds.sr.ht/~kennylevinsen/job/895142 - fails on check-format.
I see; is it better to separate out the two #defines so (presumably) it won’t enforce aligning them, or should I align them as suggested by the diff?
> On Wed, Nov 23 2022 at 02:12:42 AM +00:00:00, ~jrtc27 <jrtc27@git.sr.ht> wrote:>> +#ifdef __FreeBSD__>> + /* Some drivers have /dev/dri/X symlinked to /dev/drm/X */>> + if (STR_HAS_PREFIX("/dev/drm/", path))>> + return 1;>> +#endif> > I think it would be much more readable if left as two flat #if's like before but with the new code added to the freebsd version, even if it leads to a duplicated check for /dev/dri. #ifdefs are not great for readability, nested #ifdefs even less so.
Sure, if that’s what you’d prefer.
Jess
On Wed, Nov 30 2022 at 07:43:32 PM +00:00:00, Jessica Clarke
<jrtc27@jrtc27.com> wrote:
> The dam-subtree drivers are used for various Arm-based SoCs, though I > think the Panfrost GPU driver might be the only one where you’d > actually be able to do more than get a video console (what we’re > using). Intel/AMD/Nvidia are still in drm-kmod and as far as I know > haven’t changed behaviour.
Fair enough, just curious. :)
> I see; is it better to separate out the two #defines so (presumably) > it won’t enforce aligning them, or should I align them as suggested > by the diff?
Following the diff is fine, just like the other stuff it aligned.