Commit Graph

9035 Commits

Author SHA1 Message Date
Rene Gollent
eab06f5f40 Keyboard and Tablet were likewise using the aforementioned ioctls incorrectly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 22:23:10 +00:00
Rene Gollent
308e87fc11 The ioctl for reading mouse parameters was missing the structure size. This would cause it to randomly fail and exit the loop, resulting in the mouse going unresponsive.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 22:12:06 +00:00
Michael Lotz
233d1dc479 Implement variable joystick mode in the JoystickProtocolHandler. It supports
both, variable and extended joystick mode, using the same mechanism of mimicing
the extended_joystick structure with the variable one if required. The mode
used depends on the support flag coming in from BJoystick (currently off), so
with this commit the behaviour doesn't change. I'm going to flip that switch
next though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 21:11:38 +00:00
Philippe Houdoin
fccb048765 Fixed gcc2 build (sorry).
Plus one forgotten small style fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 12:39:51 +00:00
Philippe Houdoin
1291377a6e Applied patch by Pete Goodeve, which adds multi-ports support to usb_midi driver.
Fixed some coding style and a few sanity checks where it make sense.

This driver code is not in a good shape and needs a wide cleanup.
unfortunatly, I still don't have any device to test with, so I can't do that anytime soon.
Intead of letting his patch collecting dust since 3 months (my bad),
I think it's better the multi-port support gets at least more exposure than
just Pete's hardware.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-03 10:30:03 +00:00
Alexander von Gluck IV
5d6dcc0685 remove AtomInit.. breaks radeon_hd build due to missing return and I have a while until I can implement it fully
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 23:05:24 +00:00
Alexander von Gluck IV
1dac446909 added scale update locking register; remove leftover intel hack thats not needed on Radeon; fix gcc4 warning on card model comparison
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 22:50:28 +00:00
Michael Lotz
5052c5b678 Make adjustments to the JoystickProtocolHandler so that it works in accordance
with the BJoystick requirements:

* Make the Read() non-blocking. This is required as BJoystick is a polling
  interface. A single current state is used that is updated by a separate thread
  on report arrival. The thread is spawned as soon as the ProtocolHandler is
  opened for the first time (and quit at the first wait return after the
  ProtocolHandler is closed). With this we can simply return the current state
  on read.
* Remove the ring buffer as it was not needed in the first place. This also
  happens to solve the problem of sharing a JoystickProtocolHandler. Before,
  concurrent reads would queue up the same result multiple times in the ring
  buffer and then return stale data on the next update.

Solves most of #7629.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-02 00:56:18 +00:00
Michael Lotz
23249681ab Since we never actually read more than one mouse_movement at a time and we only
ever wait for reports on demand, there's no need for buffering at all.
This removes some unnecessary copying and ring buffer overhead, the ring buffer
will now in fact not be created at all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 23:34:03 +00:00
Alexander von Gluck IV
eb1b3e422f implement AtomBios CailRead/WriteFBData callbacks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 18:34:13 +00:00
Alexander von Gluck IV
3fcaf0d61c remove unneeded orphan function declaration for AllocateFB
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 14:55:40 +00:00
Alexander von Gluck IV
057f5d1d50 GCC2 build fixes on radeon_hd driver
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-01 14:39:15 +00:00
Michael Lotz
f46bc7f19e * Add a JoystickProtocolHandler to usb_hid that supports the BJoystick protocol.
This includes input scaling, so the resulting input ranges should always match
  the ones of the BJoystick data (hence no calibration should be required).
* It supports joysticks, gamepads and multi-axis controllers. I've only tested
  it with a Microsoft SideWinder Gamepad Pro so far, which now works as expected
  with stickit.
* Fixes #7429.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:21:05 +00:00
Michael Lotz
10a1a81d02 Also clear the sign extension when not changing signedness, as otherwise we'll
overwrite the values with the sign extension.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-31 02:09:10 +00:00
Michael Lotz
6d551ee44f Also take the unsigned -> signed conversion into account.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 22:31:59 +00:00
Michael Lotz
d75a906285 Add a ScaledData() getter that scales the data to the desired bit width and
converts the signed-ness as specified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41843 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:45:10 +00:00
Clemens Zeidler
a4710c0d46 Move ServerConnection class from the IMAP add-on to libmail.so. This avoids to init SSL each time an IMAP add-on
is loaded. SMTP and POP still have this problem! TODO: use the ServerConnection class in these add-ons too.
This would also remove a lot of #ifdef SSL form these add-ons. Will not do it in the near future, feel free to fix it
...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 21:36:06 +00:00
Michael Lotz
b5274bc4f6 Pass read and write calls to the protocol handlers as well, moving the default
of returning B_ERROR to the ProtocolHandler base class. Not used yet, but will
be used for the BJoystick <-> JoystickProtocolHandler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 19:53:14 +00:00
Clemens Zeidler
b58ab52cd6 SSL should be thread safe (right?) but SSL_library_init function and SSL_load_error_strings are not, or they should be called only once...
Remove extra ssl lock, there is already one in ssl.
This fixes #7574. I have seen this or a similar bug before and it was quit reproduceable, now it seems to be fixed.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-30 05:46:10 +00:00
Fredrik Modeen
981bdb5af9 Hope I fix more than I breake with this update of ipro1000
it's taken from freebsd driver e1000 r221505

This include alot of cards (including my HP)

I had to "remove" som parts. led was the easiest part. All code shoulc have haiku in them

The part below was perhaps needed but I could not fix the error that whas showing (located in if_em.c) aslo it works as is on my HP 8540.

static int
em_sysctl_reg_handler(SYSCTL_HANDLER_ARGS)
{
	struct adapter *adapter;
	u_int val;

	adapter = oidp->oid_arg1;
	val = E1000_READ_REG(&adapter->hw, oidp->oid_arg2);
	return (sysctl_handle_int(oidp, &val, 0, req));
}

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-29 19:27:05 +00:00
Michael Lotz
305aff3f78 * Changed the way how devices are enumerated and protocol handlers are added to
handle the different device classes. Handlers are now added based on the
  application collections that the HID descriptor describes instead of by
  enumerating the different report items inside the reports. This means that a
  device is now logically treated as a mouse when it comes with an application
  collection that designates it as a mouse, instead of when there is a report
  that contains an X and a Y axis. This resolves the conflicts that gamepads
  and joysticks were added as mice due to them containing such elements. This
  therefore fixes #4499 and opens up the way to properly handle other device
  types like joysticks (#7429), gamepads, tablets (#7354, #5989 and #7481) and
  so on. I'll work on gamepads/joysticks next and see where we stand for tablets
  later.
* Added a few enumeration functions to HIDCollection to support the above.
* Fix the root collection handling. A device doesn't describe a single root
  collection and then adds everything as a child. Instead it just has multiple
  collections on level 0. We account for that now by always creating an empty
  logical collection as the root collection where all the collections of the
  descriptor get added.
* Rename the {Mouse|Keyboard}Device.{cpp|h} to
  {Mouse|Keyboard}ProtocolHandler.{cpp|h} as that more clearly describes their
  purpose. These classes are protocol handlers, i.e. they handle the ioctl based
  mouse and keyboard protocol between the driver and the input_server add-ons.
* Change a lot of stuff to use references instead of pointers where it makes
  sense (not necessarily complete yet).

I've tested this successfully on a keyboard with extended keys, a combo device
with a keyboard with extended keys and a mouse, a mouse and a gamepad (that now
doesn't do anything anymore) and found no regressions. However, since there are
a lot of very varied ways how to describe such functions with HID, it's not too
unlikely that some more curiously described devices will now stop working. These
have to be handled case by case and their usages have to be added to the added
to the appropriate handlers (or new handlers have to be written). Please test
and create bug reports (preferrably including the report descriptor that is
written out to /tmp).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-28 19:59:02 +00:00
Alexander von Gluck IV
3035edeb39 add Radeon HD2600 PCIID, Thanks Benjamin A!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-28 16:29:16 +00:00
Jérôme Duval
3cd099e2d4 Patch from Jérôme Leveque: Work in progress: code cleanup (includes dos newlines and 80 chars by line)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 18:59:25 +00:00
Alexander von Gluck IV
27dde8e939 small style fix; no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 02:16:00 +00:00
Alexander von Gluck IV
217c0b1d48 Add surface address high handling; set primary and secondary surface frame buffer offset
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-27 02:14:54 +00:00
Alexander von Gluck IV
5f6744a8cd * move all register calculation into init_registers to
keep things simple to troubleshoot
* use crt offset only on evergreen, else use AMD provided
  register locations
* init_registers(crtid) is called before making register calls
  to a monitor.
* init_registers supports 1-2 displays on r600-r700
* init_registers supports 1-6 displays on r800+ (AMD eyefinity)
* restore CardBlankSet function in a more simple form
  (still needs init_registers addition)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-26 04:51:57 +00:00
Alexander von Gluck IV
2cc7e38c93 temporarly disable screen blanking; setting V/H blank start/end is what was causing empty display, disabled for now; Hardware video mode setting is close!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-25 22:42:37 +00:00
Alexander von Gluck IV
3be5e03652 * rename graphics_memory to frame_buffer. lets keep consistant
* pass mapped frame buffer area id to accelerant
* remove my temporary hacked together frame buffer memory mapping
* completely rely on PCI BAR for now for aperture size / location instead of
  R6XX_CONFIG_FB_BASE reg.
* Remove my temporary AllocateFB function.
* set grphPrimarySurfaceAddr to physical memory frame buffer location (offset 0)
* fix P/N sync setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41722 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-24 22:08:54 +00:00
Michael Lotz
35e8baa6b0 Fix typo in error output and a little automatic whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41715 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-24 17:01:35 +00:00
Michael Lotz
c05a3fa6a7 We obviously need to mask off the interrupt threshold value before overwriting
it with our new setting. Otherwise we might end up with an illegal value as the
interrupt threshold which might inhibit interrupt generation alltogether
depending on the controller implementation. This was the case for the ATI/AMD
SBx00 chipsets. Therefore fixes #5551.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-23 21:53:12 +00:00
Michael Lotz
fe81732aca Tiny cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-23 21:48:40 +00:00
Michael Lotz
ce44796e34 Introduce simplistic poll mode for EHCI. If enabled a thread will run the
interrupt handler every millisecond so it can check for interrupts to handle.
While this is certainly not ideal, it allows EHCI to run (surprisingly well
even) on chipsets that experience interrupt routing issues.
It can be enabled with the safemode setting "ehci_polling on" that can either
be entered using the new advanced debug option entry in the bootloader and/or
in the kernel settings file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-23 20:50:21 +00:00
Ingo Weinhold
10919035c8 PlainTextCatalog::WriteToFile(): Escape characters in the comment string.
Hopefully undoes the string changes seen on HTA since r41629.

Note that the asymmetric escaping/unescaping (PlainTextCatalog::WriteToFile()
vs. BHashMapCatalog::SetString()) is rather broken and needs to be fixed.

+alpha I guess.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-22 21:21:01 +00:00
Jérôme Duval
c0b58c071f * added some EHCI definitions (specification 1.1)
* enable per-port change events when available


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-22 19:44:09 +00:00
Jérôme Duval
cca52e7987 ehci usb driver:
* make sure the PortEnable bit is disabled (specification page 28)
* 250ms is too long: USB 2.0 specifies only 50ms. This prevented one of my devices to be detected.
+alpha


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-22 18:43:29 +00:00
Clemens Zeidler
45f20f8f91 Fix reading long lines in multiple bunches. Thanks pulkomandy for testing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-22 08:49:31 +00:00
Alexander von Gluck IV
51a43d0ff4 ensure framebuffer doesn't exceed PCI bar; add basic monitoring of frame buffer memory allocation; fix return of framebuffer to OS to be the correct area
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-19 17:39:07 +00:00
Stephan Aßmus
b46615c55a Applied patch by Joseph "looncraz" Groover from ticket #7445.
This changes how Decorators are managed and applied. The app_server
no longer scans and maintains the available ones himself, but is
simply asked to load a Decorator add-on from a provided path.
The Decorator scanning is moved into DecorInfo and DecorInfoUtil,
private classes in the InterfaceKit. The bin command 'setdecor'
uses those.
I cleaned up all the coding style violations that I could find,
removed chunks of code which didn't make sense (if you never put
a NULL pointer into a list, you don't need to check for this and
so on) and also cleaned up other passages for improved clarity
and simplicity.
I also tested the functionality and it works fine. Would even be
Ok to include in Alpha 3, IMHO. Thanks for the patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-19 15:25:54 +00:00
Alexander von Gluck IV
90af954387 * actually set device_chipset before reading it.
* make shared memory info naming clearer.
* move frame buffer internal offset read to driver
* remove check of > 512MB as we really should always use frame_buffer_size


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-18 18:38:28 +00:00
Ingo Weinhold
c2069a9a2e Patch by "starsseed" (with style fixes by myself):
PartitionMapWriter::WriteMBR(): Also read the old MBR from disk when the boot
code shall be overwritten. Prevents overwriting of the disk ID. Closes ticket
#7507.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-18 10:34:53 +00:00
Alexander von Gluck IV
e7812dd963 correct missed improper int size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-18 05:28:28 +00:00
Alexander von Gluck IV
e8de44210d fix reversed memory units
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-18 05:25:41 +00:00
Alexander von Gluck IV
56e6d991bb make math easier to read; fix chipset int length; additions to CardScale
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-18 04:25:05 +00:00
Alexander von Gluck IV
c41d9ce694 add viewport registers; correct chipset dependent scale code; rename virtualheight to make it more consistant; spell check
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-17 18:00:58 +00:00
Alexander von Gluck IV
fc7b565382 now CRT is 0-1 vs 1-2
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-17 17:12:16 +00:00
Alexander von Gluck IV
bd34b2f756 * enhance tracing of accelerant
* introduce a global struct to hold register locations for
  Radeon HD chipset model this accelerant was spawned for.
* add Radeon 5430 PCIID


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-17 17:08:06 +00:00
Alexander von Gluck IV
2a2b9f942c r600 chipset pciids are a mess, added a few more chipsets from AMD's site
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-17 14:44:49 +00:00
Alexander von Gluck IV
e6f5f4a6ef improve on Radeon HD pciid list
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-16 20:29:54 +00:00
Alexander von Gluck IV
6c43ea6336 read and store aperture size (will be used in fblocation calculations)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-16 18:10:49 +00:00
Jérôme Duval
22f4c33994 * select idle alternate when stopping the UVC device.
* set up a dumb deframer.
* received isochronous buffers can be zero length: loop instead of breaking.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-16 17:31:38 +00:00