From: Adam Jackson <ajax@redhat.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 2/3] drm/edid: Pull mode sync flag setup out to its own function
Date: Wed, 6 Jun 2012 15:07:52 -0400 [thread overview]
Message-ID: <1339009673-30704-2-git-send-email-ajax@redhat.com> (raw)
In-Reply-To: <1339009673-30704-1-git-send-email-ajax@redhat.com>
For readability, since this is about to get more complicated.
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
drivers/gpu/drm/drm_edid.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index e7547e3..be21040 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -853,6 +853,16 @@ drm_mode_do_interlace_quirk(struct drm_display_mode *mode,
mode->flags |= DRM_MODE_FLAG_INTERLACE;
}
+static void
+drm_mode_detailed_set_sync_flags(struct detailed_pixel_timing *pt,
+ unsigned int *flags)
+{
+ *flags |= (pt->misc & DRM_EDID_PT_HSYNC_POSITIVE) ?
+ DRM_MODE_FLAG_PHSYNC : DRM_MODE_FLAG_NHSYNC;
+ *flags |= (pt->misc & DRM_EDID_PT_VSYNC_POSITIVE) ?
+ DRM_MODE_FLAG_PVSYNC : DRM_MODE_FLAG_NVSYNC;
+}
+
/**
* drm_mode_detailed - create a new mode from an EDID detailed timing section
* @dev: DRM device (needed to create new mode)
@@ -938,10 +948,7 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
pt->misc |= DRM_EDID_PT_HSYNC_POSITIVE | DRM_EDID_PT_VSYNC_POSITIVE;
}
- mode->flags |= (pt->misc & DRM_EDID_PT_HSYNC_POSITIVE) ?
- DRM_MODE_FLAG_PHSYNC : DRM_MODE_FLAG_NHSYNC;
- mode->flags |= (pt->misc & DRM_EDID_PT_VSYNC_POSITIVE) ?
- DRM_MODE_FLAG_PVSYNC : DRM_MODE_FLAG_NVSYNC;
+ drm_mode_detailed_set_sync_flags(pt, &mode->flags);
set_size:
mode->width_mm = pt->width_mm_lo | (pt->width_height_mm_hi & 0xf0) << 4;
--
1.7.7.6
next prev parent reply other threads:[~2012-06-06 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 19:07 [PATCH 1/3] drm/edid: Be stricter about stereo mode rejection Adam Jackson
2012-06-06 19:07 ` Adam Jackson [this message]
2012-06-06 19:07 ` [PATCH 3/3] drm/edid: Add csync parsing Adam Jackson
2012-08-31 18:03 ` [PATCH 1/3] drm/edid: Be stricter about stereo mode rejection Adam Jackson
2012-08-31 18:21 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339009673-30704-2-git-send-email-ajax@redhat.com \
--to=ajax@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.