Bug 45354

Summary: XFree XInput device bug (patch included)
Product: [Retired] Red Hat Linux Reporter: Joe Krahn <krahn>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-21 14:10:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Krahn 2001-06-21 14:10:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-SGI_XFS_1.0 i686)

Description of problem:
XFree86 internal XInput calls does not correctly process device valuator
data that does not report starting from valuator 0. Most XInput devices
report all valuators from 0, and are not affected. I have created/updated 3
XInput devices that are affected, in particular the SGI 8-knob dialbox.

Fortunately, the fix is simple. Please add the patch to the next XFree86
release so that I can distribute the new (beta) XInput drivers. See the
patch in Additional Info. section. (Bug has been reported to XFree86 as
well.)


How reproducible:
Always

Steps to Reproduce:
Install an XInput device that reports valuators staring other than zero. (I
don't think any of the current 4.x supported drivers do this)

Actual Results:  Running: xinput test dial+buttons, all knobs report as
valuator 0.


Expected Results:  XEvents should report valuators 0-7.

Additional info:

PATCH for 4.1.0 source (4.0.3 source is identical)

*** xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c.orig     Tue Jun 19
13:55:17 2001
--- xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c.new      Tue Jun 19
13:55:17 2001
***************
*** 931,937 ****
      
      va_start(var, num_valuators);
  
!     loop_start = 0;
      for(loop=0; loop<num_valuators; loop++) {
  
        valuator[loop%6] = va_arg(var,int);
--- 931,937 ----
      
      va_start(var, num_valuators);
  
!     loop_start = first_valuator;
      for(loop=0; loop<num_valuators; loop++) {
  
        valuator[loop%6] = va_arg(var,int);
***************
*** 1074,1080 ****
                    axisvals[1] = y;
                }
            }
!           loop_start = loop + 1;
        }
      }
      va_end(var);
--- 1074,1080 ----
                    axisvals[1] = y;
                }
            }
!           loop_start += 6;
        }
      }
      va_end(var);

Comment 1 Mike A. Harris 2001-07-13 01:39:09 UTC
I appreciate your patch, and your efforts of submitting it to us, however
Xinput drivers are not an area I'm familiar enough with to feel confident
that this enhancement is non-intrusive.  Also, I do not want our release to be
incompatible in any way to XFree86 sources in significant ways wherever
possible.  As such I would much rather wait until the patch is accepted
into the main XFree86 codebase, then I can pick up the patches when I
code merge with XFree86 xf-4_1-branch, or if it is in head CVS, when I
pick up the next release of XFree86.

Thanks again however for your submission.