-
Couldn't load subscription status.
- Fork 196
Use smaller cursor sizes #840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@notbabaisyou Ping, as I couldn't add you as a reviewer through the github interface. |
db47932 to
b647cbb
Compare
|
@stefan11111 theoretically you should also be able to assign @X11Libre/wranglers as reviewers. |
b647cbb to
7caacfd
Compare
|
Picked the first two commits, for the remaining like to hear some more other oppinions.
@callmetango can you care of adding him to our org / groups ? |
b39b059 to
d2927e1
Compare
Rebased now. |
yes large cursors are great for presentations or being old as dirt with bad eyes Originally posted by @HaplessIdiot in #734 (comment) |
Yes, I just invited him. |
As this pr is written right now, the cursor buffer is at least 64x64, which is quite big already. Also, in the bigger pr I also add an option for setting the cursor to be as big as desired, so this will be adjustable in xorg.conf. Also, the cursor buffer size is just an upper bound for the cursor glyph. If the glyph is 9 x 16, like it is on my machine usually, the rendered cursor will look that same regardless of if the cursor buffer is 32x32, 64x64 or 256x256. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this approach since this just thrashes the kernel with probe attempts, there really isn't a good way to figure out an optimal cursor without the drivers actually telling us.
Aside from that, a bunch of nits but I won't stop you from doing this.
| /* Need to extend HWcursor support to handle mask interleave */ | ||
| if (!ms->drmmode.sw_cursor) | ||
| xf86_cursors_init(pScreen, cursor_dim.width, cursor_dim.height, | ||
| xf86_cursors_init(pScreen, ms->cursor_image_width, ms->cursor_image_height, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is using a single size for everything really a good idea? This'll cause issues for anyone using a larger than the smallest functioning cursor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was already a single size for everything in the old code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old code used min_cursor_[width|height] for the minimum cursor size which it got through probing and max_cursor_[width|height] was the assumed maximum cursor size which was given through DRM_CAP_CURSOR_[WIDTH|HEIGHT]
|
|
||
| bpp = 32; | ||
|
|
||
| drmmode_get_smallest_supported_cursor(pScrn, &ms->cursor_image_width, &ms->cursor_image_height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the smallest cursor available will break hardware cursors the moment you go above the smallest size as explained above. My PR did exactly what was done before and that is use the largest cursor available for the buffer but tell the hardware to only use a part of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the hw cursor code is designed, the cursor glyph will never be bigger than the size we tell it to use as the max, so we should never go over this size when setting the actual hw cursor size with ioctl's.
|
The work so far on the cursor is seriously cool thanks for working on this with such precision. |
|
once all conversations are finished up and getting some more acks, I'm going to merge this :) great work, thanks. |
e925991 to
b0c10f3
Compare
|
@notbabaisyou @metux @callmetango |
|
@notbabaisyou @b-aaz |
b0c10f3 to
55540ec
Compare
afc4685 to
fa2310f
Compare
|
@metux @callmetango @b-aaz @cepelinas9000 @notbabaisyou @algrid @X11Libre/wranglers ping and please review. |
|
This is a very important change if we arent using the full cursor buffer why waste latency running the whole buffer this is excellent! |
911b09a to
d35d531
Compare
d35d531 to
fa7d2e6
Compare
Signed-off-by: stefan11111 <[email protected]>
6165829 to
d0af3e2
Compare
…rted by all CRTCs. We try to find the smallest size we can use for the cursor image. Signed-off-by: stefan11111 <[email protected]>
|
Rebased and simplified following #1109 @metux @callmetango @b-aaz @cepelinas9000 @algrid @X11Libre/reviewers ping |
|
@stefan11111 Unfortunately, I can't comment on the technical aspects. But I am definitely in favor of a solution. |
|
Looks good to me, but maybe somebody with more actual HW can test it ? |
Note that this pr only changes behavior on systems where |
|
ACK. With this patch on my laptop now cursor behaves correctly and fixes this problem when there visible parts of cursor during switching. There how it looks on my laptop with added |
Split from #734
Still incomplete, as on most hw this just uses the largest cursor available, and coloring the cursor buffer is really inefficient, but I have to pick somewhere to split the above pr.
Part-of: #549
Part-of: #675