* [PATCH 1/3] drm/i915: Document the find_pll() function
@ 2013-02-28 17:19 ville.syrjala
2013-02-28 17:19 ` [PATCH 2/3] drm/i915: Remove a stale and misplaced comment ville.syrjala
2013-02-28 17:19 ` [PATCH 3/3] drm/i915: Kill a few pointless comments ville.syrjala
0 siblings, 2 replies; 5+ messages in thread
From: ville.syrjala @ 2013-02-28 17:19 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The proper use of find_pll() isn't always so easy to determine from the
code itself. Some documentation should help.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ebe9dae..27ad084 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -71,8 +71,24 @@ typedef struct intel_limit intel_limit_t;
struct intel_limit {
intel_range_t dot, vco, n, m, m1, m2, p, p1;
intel_p2_t p2;
- bool (* find_pll)(const intel_limit_t *, struct drm_crtc *,
- int, int, intel_clock_t *, intel_clock_t *);
+ /**
+ * find_pll() - Find the best values for the PLL
+ * @limit: limits for the PLL
+ * @crtc: current CRTC
+ * @target: target frequency in kHz
+ * @refclk: reference clock frequency in kHz
+ * @match_clock: if provided, @best_clock P divider must
+ * match the P divider from @match_clock
+ * used for LVDS downclocking
+ * @best_clock: best PLL values found
+ *
+ * Returns true on success, false on failure.
+ */
+ bool (*find_pll)(const intel_limit_t *limit,
+ struct drm_crtc *crtc,
+ int target, int refclk,
+ intel_clock_t *match_clock,
+ intel_clock_t *best_clock);
};
/* FDI */
--
1.7.12.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] drm/i915: Remove a stale and misplaced comment
2013-02-28 17:19 [PATCH 1/3] drm/i915: Document the find_pll() function ville.syrjala
@ 2013-02-28 17:19 ` ville.syrjala
2013-02-28 17:19 ` [PATCH 3/3] drm/i915: Kill a few pointless comments ville.syrjala
1 sibling, 0 replies; 5+ messages in thread
From: ville.syrjala @ 2013-02-28 17:19 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The load detection code has moved around at some point, but it left
a comment behind. The code now looks to be different enough to make
the comment stale as well. Just remove it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 27ad084..1281593 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6461,20 +6461,6 @@ static void intel_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
intel_crtc_load_lut(crtc);
}
-/**
- * Get a pipe with a simple mode set on it for doing load-based monitor
- * detection.
- *
- * It will be up to the load-detect code to adjust the pipe as appropriate for
- * its requirements. The pipe will be connected to no other encoders.
- *
- * Currently this code will only succeed if there is a pipe with no encoders
- * configured for it. In the future, it could choose to temporarily disable
- * some outputs to free up a pipe for its use.
- *
- * \return crtc, or NULL if no pipes are available.
- */
-
/* VESA 640x480x72Hz mode to set on the pipe */
static struct drm_display_mode load_detect_mode = {
DRM_MODE("640x480", DRM_MODE_TYPE_DEFAULT, 31500, 640, 664,
--
1.7.12.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] drm/i915: Kill a few pointless comments
2013-02-28 17:19 [PATCH 1/3] drm/i915: Document the find_pll() function ville.syrjala
2013-02-28 17:19 ` [PATCH 2/3] drm/i915: Remove a stale and misplaced comment ville.syrjala
@ 2013-02-28 17:19 ` ville.syrjala
2013-03-01 11:35 ` Chris Wilson
1 sibling, 1 reply; 5+ messages in thread
From: ville.syrjala @ 2013-02-28 17:19 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The code is totally obvious so these comments serve no purpose. What's
worse, one of them was wrong. Just remove them.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 1281593..0644f20 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -487,7 +487,6 @@ static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc,
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
if (intel_is_dual_link_lvds(dev)) {
- /* LVDS dual channel */
if (refclk == 100000)
limit = &intel_limits_ironlake_dual_lvds_100m;
else
@@ -514,10 +513,8 @@ static const intel_limit_t *intel_g4x_limit(struct drm_crtc *crtc)
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
if (intel_is_dual_link_lvds(dev))
- /* LVDS with dual channel */
limit = &intel_limits_g4x_dual_channel_lvds;
else
- /* LVDS with dual channel */
limit = &intel_limits_g4x_single_channel_lvds;
} else if (intel_pipe_has_type(crtc, INTEL_OUTPUT_HDMI) ||
intel_pipe_has_type(crtc, INTEL_OUTPUT_ANALOG)) {
--
1.7.12.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] drm/i915: Kill a few pointless comments
2013-02-28 17:19 ` [PATCH 3/3] drm/i915: Kill a few pointless comments ville.syrjala
@ 2013-03-01 11:35 ` Chris Wilson
2013-03-03 20:07 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2013-03-01 11:35 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
On Thu, Feb 28, 2013 at 07:19:46PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The code is totally obvious so these comments serve no purpose. What's
> worse, one of them was wrong. Just remove them.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
All 3 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] drm/i915: Kill a few pointless comments
2013-03-01 11:35 ` Chris Wilson
@ 2013-03-03 20:07 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2013-03-03 20:07 UTC (permalink / raw)
To: Chris Wilson, ville.syrjala, intel-gfx
On Fri, Mar 01, 2013 at 11:35:58AM +0000, Chris Wilson wrote:
> On Thu, Feb 28, 2013 at 07:19:46PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > The code is totally obvious so these comments serve no purpose. What's
> > worse, one of them was wrong. Just remove them.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> All 3 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
And all three merged to dinq, thanks.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-03 20:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28 17:19 [PATCH 1/3] drm/i915: Document the find_pll() function ville.syrjala
2013-02-28 17:19 ` [PATCH 2/3] drm/i915: Remove a stale and misplaced comment ville.syrjala
2013-02-28 17:19 ` [PATCH 3/3] drm/i915: Kill a few pointless comments ville.syrjala
2013-03-01 11:35 ` Chris Wilson
2013-03-03 20:07 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).