Commit Graph

98 Commits

Author SHA1 Message Date
Adrien Destugues
6389df937b * Bring back the fallback video mode selection in case both tries to read EDID info failed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-23 20:05:24 +00:00
Axel Dörfler
f16be37f87 * Fixed strange/wrong indentation.
* Made sure the 80 character per line limit is honoured.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 12:36:52 +00:00
Adrien Destugues
a8a33a98ff Intel_extreme now centers the screen when one select a resolution smaller than the ne of the LVDS panel.
Also clean up the style and add some more TODOs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 09:13:41 +00:00
Adrien Destugues
124a502a7a Always set the LVDS panel to its native mode, except for the 'display' part.
This allows to use lower resolution screen modes with black border.

Added a set of TODOs :
 * The smaller scren is not centered, but aligned top-left
 * The base resolution used is the one reported from edid 1.1, because I'm still not sure how to parse EDID 1.2. This resolution is too small on my laptop, but it works.

Also added two ways of setting 8-to-6 dithering for 18-bit LVDS panel. No visible result for me, unfortunately.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 15:06:49 +00:00
Axel Dörfler
d401ca7b98 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 10:04:01 +00:00
Adrien Destugues
0405fd3b15 Set the color depth for head B. This allows using 8,15, and 16-bit modes on lvds panels.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 09:46:48 +00:00
Adrien Destugues
0767bd3a8b Use the EDID info from LVDS panels :
* Read the EDID info on both port A (analog VGA monitor) and C (LVDS panel)
 * If an LVDS panel is detected, report the EDID resolutions instead of the BIOs settings

This fixes #6326, likely #5096, and possibly some others intel_extreme problems. Please test.
On the other hand, this make the screen preflet show the full list of more reported by the LVDS panel. As we don't support 
scaling, some of these modes are unuseable and lead to a garbled screen.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 11:06:50 +00:00
Axel Dörfler
d7e91d9253 * The DPMS code tried to enable the LVDS panel already if a digital display
was detected; however, it should only do so when there is an actual LVDS panel
  detected.
* This should fix one part of ticket #3149 - looks like there are two different
  issues. Thanks to Robert J. Gebis for providing me remote access to his
  system.
* Minor debug output improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-26 13:48:46 +00:00
Clemens Zeidler
c9abe8265d Revert wrongly committed files.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 22:43:50 +00:00
Clemens Zeidler
a90ebd77ee Work in progress of a Radeon HD 3200 driver to change the display mode (status when I leave the coding spring). At least it shows a picture but with a wrong scaling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 22:35:53 +00:00
Axel Dörfler
1a29279301 * Disabled overlay for the G4x series. This works around bug #4898.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-07 11:29:54 +00:00
Brecht Machiels
6cae2161f0 made code style more consistent with the rest of the driver
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-28 18:58:36 +00:00
Brecht Machiels
dfdfbd3eef * added support for GM45 (might work for other chips in the G4 series)
* added header for dealing with binary numbers and bitmasks (C++ templates)
   these "macro's" might not work well for long words, though


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-23 23:03:49 +00:00
Axel Dörfler
b198850a1b * Messed up the commit, sorry.
* Adrien? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 21:14:10 +00:00
Axel Dörfler
9c90fc59d2 * Disabled the LVDS post2 for i965 cards, maybe that helps Adrien, and don't
break the display for others. If that doesn't work out, there is probably a
  bit more to it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-22 20:36:45 +00:00
Axel Dörfler
9d3ca457dc * Restored forcing the post2 PLL divisor for display B. This should fix all
remaining problems introduced with r33633.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 22:34:08 +00:00
Michael Lotz
b5addd82d7 axeld:
Restore ignoring the BIOS provided width and height in case the timings
suggest a bigger dimension. Also re-add the corresponding comment. Should
fix #4810 and might affect #4807 as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 09:06:10 +00:00
Axel Dörfler
795bd7a697 * The save_lvds_mode() function did not correctly support the i965 chipset -
I've now removed that code, and factored out a retrieve_current_mode()
  function that can work on head A and B.
* This fixes Adrien's flickering problem on his laptop - I can't find the
  bug ticket, though. Hopefully it does not break other laptop chips. Testing
  would be welcome, as I don't have any other machine here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-18 10:03:01 +00:00
Axel Dörfler
1c9ae94636 * The panel display_mode::flags field was not correctly set, preventing direct
windows from working, for example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-17 16:55:18 +00:00
Axel Dörfler
8f935c23a8 * Don't export the overlay hooks on hardware where the overlay reportedly does
not work yet. This fixes #4215 the easy way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 16:03:30 +00:00
Axel Dörfler
8fb1f94f42 * Reverted accidental commit, fixes the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 14:15:02 +00:00
Axel Dörfler
2384335649 * Changed the way the device type is tested/set. There shouldn't be any functional
changes.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 13:02:52 +00:00
Axel Dörfler
10f01c97ec * Make sure that the bytes per scanline is always a multiple of 64. This fixes
1680x1050 with 16 bit on i865+ (still need to check the restrictions of
  older chips).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-27 18:07:37 +00:00
Axel Dörfler
7f5bbbdc56 * Removed PI, and PI2 from math.h.
* Replaced all occurences with the standard macros M_PI, and M_PI_2.
* Some coding style cleanup on the touched files, no other changes besides
  adding a missing check for a failed memory allocation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-26 11:58:43 +00:00
Philippe Houdoin
28eeacfd7f Ooops, cursor base address register should be the last written, as it's the trigger register.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-21 22:20:03 +00:00
Philippe Houdoin
9d2810262f Specify both cursor width and height.
BTW, changing cursor shape when he's invisible will show it immediatly
right now. Sounds like wrong... 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28978 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-21 20:22:29 +00:00
Axel Dörfler
89a5132e8d * Fixed typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-15 22:16:31 +00:00
Michael Lotz
7b7464670e OK, how completely can one mess up a single change? Fixed the intel_extreme
accelerant I broke.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 21:20:14 +00:00
Michael Lotz
2f464b193f Fix the build of the intel_extreme.accelerant, I obviously compiled the wrong
target when I checked it. Move the target display_mode declaration back above
the check but remove the dereferencing assignment. If proposing the display
mode succeeds it also initializes target. Thanks luroh for noticing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 18:42:03 +00:00
Michael Lotz
6b9d141359 CID 1039: Dereference mode only after checking it for NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 18:00:47 +00:00
Axel Dörfler
2d5f339dec Patch by Christopher Plymire, style-reworked by myself:
* first steps of supporting LVDS panels.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-16 18:01:34 +00:00
Axel Dörfler
0db852e1bf Fixed copy and paste error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 16:00:09 +00:00
Axel Dörfler
78fa3affbc * Overlay on the G33 does not work anymore in the secondary ring buffer;
we now always only use the primary ring buffer.
* Removed secondary ring buffer allocation and member fields.
* Increased size of the primary ring buffer to 65536 bytes.
* The bytes per row register is computed differently for 9xx chips.
* On G33, the overlay does not need a physical address anymore, so we
  don't pass B_APERTURE_NEED_PHYSICAL to the allocation anymore for that
  device.
* intel_free_memory() accidently added the aperture base to the allocation
  and would therefore never free any memory.
* INTEL_RING_BUFFER_SIZE_MASK was shifted one bit to the right, didn't
  cause any harm with our buffer sizes, yet, though.
* With these changes, the driver runs stable on a G33 chipset (I have not
  yet tested the hardware cursor, though, it might need some work, too).
  The only known issue left is that overlay flickers a bit if its buffer
  is partially backed up by reserved and allocated memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23798 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-31 18:28:48 +00:00
Axel Dörfler
1c34b9b1f5 Work in progress (might not work for you yet):
* Now uses the AGP GART module for memory management. This greatly simplifies
  the memory handling, and memory is now actually allocated on demand,
  instead of a fixed size (stolen memory is not freed, though).
* The Intel GART module should now also work with older chipsets.
* No longer remove the GTT size from the stolen memory; this appears to have
  been a mistake in the X driver. Not sure about the BIOS popup yet.
* The AGP module (in combination with the Intel GART module) is now mandatory
  to use the Intel driver.
* Removed now superfluous settings (like memory size). Only enabling/disabling
  the hardware cursor is still supported.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-29 08:55:36 +00:00
Axel Dörfler
d75c88206e * Simplified usage of the INTEL_TYPE_xxx constants.
* Added some defines needed when playing with the bridge controller.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-26 21:59:02 +00:00
Axel Dörfler
f401eba4ae * Now supports setting a framebuffer offset as overlay address instead of a physical
pointer (as needed by the G33 chipset).
* Minor debug output improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-25 16:50:52 +00:00
Axel Dörfler
59096777ec Accidently added overlay_i965.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-23 18:56:23 +00:00
Axel Dörfler
4dfa9e425f Some work in progress:
* set_gtt_entry() used the wrong index to fill the GTT - this could have never
  worked correctly when you specified more memory than the amount of stolen
  memory.
* Implementing maintaining resources for emulating overlay using the 3D engine
  on i965. I don't yet commit the actual overlay code, as that is a) ugly, and
  b) does not work yet.
* Moved AreaKeeper into its own header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-23 17:50:27 +00:00
Axel Dörfler
81abd45c3e There was no space when the buffer was completely empty...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-13 19:27:05 +00:00
Axel Dörfler
b879372352 Added the timeout to QueueCommand::MakeSpace() as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-13 15:44:41 +00:00
Axel Dörfler
8818c50507 * Made QueueCommands::Write() and MakeSpace() public.
* Implemented MakeSpace() (not yet tested).
* Changed intel_wait_engine_idle() to spin() between reads and to timeout
  after 1 second of waiting (could probably be done way earlier).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-13 14:56:28 +00:00
Axel Dörfler
7825641a7b Now clears the frame buffer before setting the mode; at least when testing,
one sometimes could still see previous contents of the screen during boot up
for some time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-10 18:42:14 +00:00
Axel Dörfler
61291964c3 The intel_extreme driver now finally works with the i965 chipset;
acceleration works fine, but overlay doesn't - that's next on my list.
Turns out the i965 differentiates between RGB-32 and RGB-32-alpha, and 
didn't like trying to use the latter as display mode (the i865 didn't 
care at all)... finding that took me *way* too long, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-31 19:23:59 +00:00
Axel Dörfler
53d781f439 * Now uses the new create_display_modes() function.
* Now supports the new B_GET_EDID_INFO hook under Haiku.
* Fixed build under BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-14 12:31:51 +00:00
Axel Dörfler
a82d70c719 Fixed PLL clock for i8xx chips again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 17:40:05 +00:00
Axel Dörfler
cbd4081064 * Fixed PLL timing computation for the i9xx chips - I mixed post2 min/max values, and did
not take the VCO limits into account; both could (and would during testing) create invalid
  frequencies.
* Also reverted the order in which the PLL divisors are traversed to match the order of what
  is used in the X driver to create comparable output (our error computation is based on float,
  though, and should therefore create more accurate values).
* The i965 introduced a special register for the surface; the former display base register
  is now only used for the view offset. Instead of setting the base manually here and there,
  there is now a set_frame_buffer_base() function.
* The DPMS code will now also turn off/on the PLL clock generator.
* The code needs some more cleanup, and while the driver now produces the correct timing on
  my i965 system, I'm now greeted by a black screen after startup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-24 09:02:35 +00:00
Axel Dörfler
523a30f313 Implemented I2C support to get the DDC EDID info from the monitor - it's working as is, but
nothing is done with the data yet (besides dumping them to the serial output).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-21 18:06:56 +00:00
Axel Dörfler
61dad86a02 * No longer switch between divisor register set 0 and 1; it doesn't really
make any sense.
* "pll" might have been set incorrectly on i8xx chips.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-19 15:07:58 +00:00
Stefano Ceccherini
e68a9aeca5 return errno when open() fails
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-17 11:46:47 +00:00
Axel Dörfler
3bac9ea19a * Work in progress to support the i965 chipset as well; still works on i865, but
doesn't work on i965 yet.
* B_GET_DISPLAY_MODE now returns the mode actually configured in the chip instead
  of the last mode set; while this isn't really necessary, it allows to check what
  mode was used during startup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-04 15:32:01 +00:00