Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: graphical console: limit resolution?
On Wed, Dec 11, 2019 at 08:24:09PM +0100, Michael van Elst wrote:
> On Wed, Dec 11, 2019 at 04:29:41PM +0100, Thomas Klausner wrote:
> >
> > So it looks like radeondrmkmsfb does not (correctly) detect the active
> > output(s)?
>
> Looks like it. There is lots of heuristics in that field.
Ok, so except for this issue, I'm successfully using the attached
diff.
What's the best way to do this, adding kernel options like:
options CONSOLE_MAX_RESOLUTION_X 1920
options CONSOLE_MAX_RESOLUTION_Y 1080
and using these defines in that location, or are there other suggestions?
Thomas
Index: drm_modes.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/drm_modes.c,v
retrieving revision 1.7
diff -u -r1.7 drm_modes.c
--- drm_modes.c 27 Aug 2018 04:58:19 -0000 1.7
+++ drm_modes.c 13 Jan 2020 16:02:32 -0000
@@ -1016,10 +1016,10 @@
drm_mode_validate_size(const struct drm_display_mode *mode,
int maxX, int maxY)
{
- if (maxX > 0 && mode->hdisplay > maxX)
+ if ((maxX > 0 && mode->hdisplay > maxX) || (mode->hdisplay > 1920))
return MODE_VIRTUAL_X;
- if (maxY > 0 && mode->vdisplay > maxY)
+ if ((maxY > 0 && mode->vdisplay > maxY) || (mode->vdisplay > 1080))
return MODE_VIRTUAL_Y;
return MODE_OK;
Home |
Main Index |
Thread Index |
Old Index