From: Chris Wilson <chris@chris-wilson.co.uk>
To: akash.goel@intel.com
Cc: intel-gfx@lists.freedesktop.org, --cc=vijay.a.purushothaman@intel.com
Subject: Re: [PATCH 1/3] drm/i915: Added a return type for panel fitter config functions
Date: Fri, 20 Jun 2014 15:03:48 +0100 [thread overview]
Message-ID: <20140620140348.GA18138@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <1403272554-20383-2-git-send-email-akash.goel@intel.com>
On Fri, Jun 20, 2014 at 07:25:52PM +0530, akash.goel@intel.com wrote:
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 912e9c4..6117639 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -824,12 +824,15 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
> intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
> adjusted_mode);
> - if (!HAS_PCH_SPLIT(dev))
> - intel_gmch_panel_fitting(intel_crtc, pipe_config,
> - intel_connector->panel.fitting_mode);
> - else
> - intel_pch_panel_fitting(intel_crtc, pipe_config,
> - intel_connector->panel.fitting_mode);
> + if (!HAS_PCH_SPLIT(dev)) {
> + if (!intel_gmch_panel_fitting(intel_crtc, pipe_config,
> + intel_connector->panel.fitting_mode))
> + return false;
> + } else {
> + if (!intel_pch_panel_fitting(intel_crtc, pipe_config,
> + intel_connector->panel.fitting_mode))
> + return false;
> + }
> }
>
> if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK)
> @@ -3782,7 +3785,7 @@ intel_dp_set_property(struct drm_connector *connector,
>
> done:
> if (intel_encoder->base.crtc)
> - intel_crtc_restore_mode(intel_encoder->base.crtc);
> + return intel_crtc_restore_mode(intel_encoder->base.crtc);
But you don't unwind the property change after failure.
>
> return 0;
> }
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index ab5962b..860d531 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -727,7 +727,7 @@ void intel_mark_busy(struct drm_device *dev);
> void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
> struct intel_engine_cs *ring);
> void intel_mark_idle(struct drm_device *dev);
> -void intel_crtc_restore_mode(struct drm_crtc *crtc);
> +int intel_crtc_restore_mode(struct drm_crtc *crtc);
> void intel_crtc_update_dpms(struct drm_crtc *crtc);
> void intel_encoder_destroy(struct drm_encoder *encoder);
> void intel_connector_dpms(struct drm_connector *, int mode);
> @@ -918,10 +918,10 @@ int intel_panel_init(struct intel_panel *panel,
> void intel_panel_fini(struct intel_panel *panel);
> void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
> struct drm_display_mode *adjusted_mode);
> -void intel_pch_panel_fitting(struct intel_crtc *crtc,
> +bool intel_pch_panel_fitting(struct intel_crtc *crtc,
> struct intel_crtc_config *pipe_config,
> int fitting_mode);
> -void intel_gmch_panel_fitting(struct intel_crtc *crtc,
> +bool intel_gmch_panel_fitting(struct intel_crtc *crtc,
> struct intel_crtc_config *pipe_config,
> int fitting_mode);
Only make significnt changes like this to one interface at a time.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2014-06-20 14:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 13:55 [PATCH 0/3] New drm crtc properties akash.goel
2014-06-20 13:55 ` [PATCH 1/3] drm/i915: Added a return type for panel fitter config functions akash.goel
2014-06-20 14:03 ` Chris Wilson [this message]
2014-06-23 8:27 ` Akash Goel
2014-06-20 13:55 ` [PATCH 2/3] drm/i915: Initialized 'set_property' fn pointer field of intel_crtc_funcs structure akash.goel
2014-06-20 13:55 ` [PATCH 3/3] drm/i915: New drm crtc property for varying the size of borders akash.goel
2014-06-20 14:07 ` [PATCH 0/3] New drm crtc properties Damien Lespiau
2014-06-23 8:28 ` Akash Goel
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=20140620140348.GA18138@nuc-i3427.alporthouse.com \
--to=chris@chris-wilson.co.uk \
--cc=--cc=vijay.a.purushothaman@intel.com \
--cc=akash.goel@intel.com \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox