[haiku-bugs] Re: [Haiku] #12613: app_server handles overlay hooks incorrectly.

  • From: "rudolfc" <trac@xxxxxxxxxxxx>
  • Date: Sat, 23 Jan 2016 23:19:39 -0000

#12613: app_server handles overlay hooks incorrectly.
----------------------------------+-----------------------------
   Reporter:  rudolfc             |      Owner:  axeld
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  Unscheduled
  Component:  Servers/app_server  |    Version:  R1/Development
 Resolution:                      |   Keywords:  overlay setmode
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+-----------------------------
Description changed by rudolfc:

Old description:

The app_server is currently handling overlay capability of videocards
quite buggy.

As fas as I saw upto now (while working on the VIA overlay engine) the
app_server just once asks the driver if overlay is supported (directly
after system boot). That's wrong.
Furthermore, the app_server asks this question even before the first mode
was set. Also wrong. The target mode should be set, and then (only then!)
the app_server should request the overlay hooks. If a new mode is set,
the hooks need to be requested again.

Please have a look at the code for the overlay hook exports in the VIA
driver for instance and you'll recognize why it should be as I just
described (and also how Be did it!)

Background:

One important item is RAM bandwidth: this is especially an item on higher
res modes, with high colorspace, on shared RAM solutions (cheaper
videocards, some laptops..):
So, if the total RAM bandwidth used for the mode itself leaves not enough
bandwidth for next to that fetching overlay images.. the hooks will, for
these modes, not be exported.

There are more restrictions depending on hardware..

Granted, for newer cards there will be less restrictions than for older
cards... Still, the way Be did it is the only theoretically correct way!

Also:
Since no mode is set before the hooks are requested, chances are some
cards don't export their hooks, as no set mode is not supported by
definition. Even if they do export the hooks, overlay is not guaranteed
to work correctly since it does not know if the mode will violate it's
hardware properties.

At least the VIA driver blocks the hooks (which is correct) because of
this.

New description:

 The app_server is currently handling overlay capability of videocards
 quite buggy.

 As fas as I saw upto now (while working on the VIA overlay engine) the
 app_server just once asks the driver if overlay is supported (directly
 after system boot). That's wrong.
 Furthermore, the app_server asks this question even before the first mode
 was set. Also wrong. The target mode should be set, and then (only then!)
 the app_server should request the overlay hooks. If a new mode is set, the
 hooks need to be requested again.

 Please have a look at the code for the overlay hook exports in the VIA
 driver for instance and you'll recognize why it should be as I just
 described (and also how Be did it!)

 Background:

 One important item is RAM bandwidth: this is especially an item on higher
 res modes, with high colorspace, on shared RAM solutions (cheaper
 videocards, some laptops..):
 So, if the total RAM bandwidth used for the mode itself leaves not enough
 bandwidth for next to that fetching overlay images.. the hooks will, for
 these modes, not be exported.

 There are more restrictions depending on hardware..

 Granted, for newer cards there will be less restrictions than for older
 cards... Still, the way Be did it is the only theoretically correct way.
 (check restrictions per mode)

 Also:
 Since no mode is set before the hooks are requested, chances are some
 cards drivers don't export their hooks, as no set mode is not supported by
 definition. Even if they do export the hooks, overlay is not guaranteed to
 work correctly since the driver does not know if the mode will violate
 it's hardware properties.

 At least the VIA driver blocks the hooks (which is correct) because of
 this.

--

--
Ticket URL: <https://dev.haiku-os.org/ticket/12613#comment:1>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: