Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1699623
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | David Lechner <david@lechnology.com> |
| Newsgroups | linux.kernel |
| Subject | [RFC] drm/fb: Propagate physical display dimensions to fbdev |
| Date | Sun, 30 Jul 2017 23:20:02 +0200 |
| Message-ID | <u93N0-5Ax-7@gated-at.bofh.it> (permalink) |
| Dkim-Signature | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wKudAOUhZivk/wa3YlugxCWDVG/dn/uBnEMqdzMKMrw=; b=TdblyzIkk5vegEhu9mrJTrlh14 UIJkEF0l1Byzt4hnJKUb0rz8e8og/WMb2OQmPvTgLBDOqZDbLwhOJAEG5DCDvYYarTDcGkpY3uUTw Cd89pxloquk9hMjEoDV3ZvhZ8eZGL7nMpX1/pxcrj67f14VRMuBfA7XW4zsR7xBSQcqBsUttQJymB E2WxWWrcd6yBBKKCt2imwEplBbheA2P1LzG4oTHmyKC7C+pfEEECqPou8ldrmtfoDEG6Vah5X38D8 LPnkTK27DBiT/4N/z2dXJkQiemzvddWVtidDzGxPRs3VI8QMyyu3ksEvwetQUVUO4FCjPM4J8KGsY boawFrrA==; |
| X-Mailer | git-send-email 2.7.4 |
| X-Antiabuse | This header was added to track abuse, please include it with any abuse report |
| X-Antiabuse | Primary Hostname - vern.gendns.com |
| X-Antiabuse | Original Domain - vger.kernel.org |
| X-Antiabuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-Antiabuse | Sender Address Domain - lechnology.com |
| X-Get-Message-Sender-Via | vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed |
| X-Authenticated-Sender | vern.gendns.com: davidmain@lechnology.com |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 34 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | David Lechner <david@lechnology.com>, linux-kernel@vger.kernel.org |
| X-Original-Date | Sun, 30 Jul 2017 16:11:38 -0500 |
| X-Original-Message-ID | <1501449098-26148-1-git-send-email-david@lechnology.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1699623 |
Show key headers only | View raw
fbdev has a place for the physical width and height of a display. I would
like to have this information available to userspace. This patch works for me,
but I have a strong suspicion that this is not the "right way".
Any suggestions on how to get the proper struct drm_display_info here
rather than assuming the first connector one is valid? I don't see an obvious
way to do this.
---
drivers/gpu/drm/drm_fb_helper.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 574af01..ff422da 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1768,8 +1768,14 @@ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helpe
info->var.xoffset = 0;
info->var.yoffset = 0;
info->var.activate = FB_ACTIVATE_NOW;
- info->var.height = -1;
- info->var.width = -1;
+
+ if (fb_helper->connector_count) {
+ info->var.height = fb_helper->connector_info[0]->connector->display_info.width_mm;
+ info->var.width = fb_helper->connector_info[0]->connector->display_info.height_mm;
+ } else {
+ info->var.height = -1;
+ info->var.width = -1;
+ }
switch (fb->format->depth) {
case 8:
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[RFC] drm/fb: Propagate physical display dimensions to fbdev David Lechner <david@lechnology.com> - 2017-07-30 23:20 +0200 Re: [RFC] drm/fb: Propagate physical display dimensions to fbdev Daniel Vetter <daniel@ffwll.ch> - 2017-07-31 09:50 +0200
csiph-web