From patchwork Thu Jun 20 15:46:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Syrjala X-Patchwork-Id: 11007165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 075B51398 for ; Thu, 20 Jun 2019 15:46:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC646287E5 for ; Thu, 20 Jun 2019 15:46:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0DCF287D3; Thu, 20 Jun 2019 15:46:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ECA4B288E0 for ; Thu, 20 Jun 2019 15:46:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 576AE6E5CB; Thu, 20 Jun 2019 15:46:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 907826E5C8; Thu, 20 Jun 2019 15:46:12 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jun 2019 08:46:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,397,1557212400"; d="scan'208";a="154155046" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga008.jf.intel.com with SMTP; 20 Jun 2019 08:46:09 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 20 Jun 2019 18:46:08 +0300 From: Ville Syrjala To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: Dump mode picture aspect ratio Date: Thu, 20 Jun 2019 18:46:08 +0300 Message-Id: <20190620154608.16239-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Currently the logs show nothing about the mode's aspect ratio. Include that information in the normal mode dump. Cc: Ilia Mirkin Signed-off-by: Ville Syrjälä --- drivers/video/hdmi.c | 3 ++- include/drm/drm_modes.h | 4 ++-- include/linux/hdmi.h | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c index b939bc28d886..bc593fe1c268 100644 --- a/drivers/video/hdmi.c +++ b/drivers/video/hdmi.c @@ -1057,7 +1057,7 @@ static const char *hdmi_colorimetry_get_name(enum hdmi_colorimetry colorimetry) return "Invalid"; } -static const char * +const char * hdmi_picture_aspect_get_name(enum hdmi_picture_aspect picture_aspect) { switch (picture_aspect) { @@ -1076,6 +1076,7 @@ hdmi_picture_aspect_get_name(enum hdmi_picture_aspect picture_aspect) } return "Invalid"; } +EXPORT_SYMBOL(hdmi_picture_aspect_get_name); static const char * hdmi_active_aspect_get_name(enum hdmi_active_aspect active_aspect) diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index 083f16747369..2b1809c74fbe 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -431,7 +431,7 @@ struct drm_display_mode { /** * DRM_MODE_FMT - printf string for &struct drm_display_mode */ -#define DRM_MODE_FMT "\"%s\": %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x" +#define DRM_MODE_FMT "\"%s\": %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x %s" /** * DRM_MODE_ARG - printf arguments for &struct drm_display_mode @@ -441,7 +441,7 @@ struct drm_display_mode { (m)->name, (m)->vrefresh, (m)->clock, \ (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \ (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \ - (m)->type, (m)->flags + (m)->type, (m)->flags, hdmi_picture_aspect_get_name((m)->picture_aspect_ratio) #define obj_to_mode(x) container_of(x, struct drm_display_mode, base) diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h index 9918a6c910c5..de7cbe385dba 100644 --- a/include/linux/hdmi.h +++ b/include/linux/hdmi.h @@ -434,4 +434,7 @@ int hdmi_infoframe_unpack(union hdmi_infoframe *frame, void hdmi_infoframe_log(const char *level, struct device *dev, const union hdmi_infoframe *frame); +const char * +hdmi_picture_aspect_get_name(enum hdmi_picture_aspect picture_aspect); + #endif /* _DRM_HDMI_H */