Egbert Eich <[email protected]> writes:

> Some ioctls may not be supported by the kernel however their failure
> is non-fatal to the driver. Unfortunately we only know once we try
> to execute the ioctl however the sematics of the fbdev driver API
> doesn't allow upper layers to disable the call.
> Instead of changing the fbdevHW driver API just disable the call to
> this ioctl on the module level when detecting such a case.

I'd not bother with remembering whether the ioctls were supported and
just call every time, ignoring any errors and not printing
anything ever.

If you want an error message on the first call, I think just having a
static boolean within the lexical scope of the function would be simpler
than adding the per-device bitmask, enum of unsupported ioctl names etc.

Of course, I don't care *that* deeply either, so if this is really what
you want...

> +    if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) fbmode)) {
> +        switch (errno) {
> +        case EAGAIN:
> +        case EINTR:
> +        case ERESTART:
> +            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> +                       "FBIOBLANK: %s\n", strerror(errno));
> +            break;

Presumably some of these values should cause the driver to retry the
operation?

-- 
[email protected]

Attachment: pgpHyObH1O6oK.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to