From patchwork Sat Oct 20 18:57:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1621951 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 37627DF26F for ; Sat, 20 Oct 2012 18:59:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 38FAF9EB36 for ; Sat, 20 Oct 2012 11:59:22 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id C3AB89E7A8 for ; Sat, 20 Oct 2012 11:57:53 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id u50so782884wey.36 for ; Sat, 20 Oct 2012 11:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Wxb55pMPrHmuPTHRSrkDNmCI82JlawWjsw/zAEtY4EE=; b=d/ympjr3nPb7yLbt8JibcDrc9jE4i9PQEOnGH8iu4um5aT0K/vy9mO518larcweRcG teKZUFZT64j3mrexNmOAOrjz8yeOsbL05o38chphZujwVGKbO7FwXE2kz5kHIftvxL56 zFPYNITS+aChZDGq++9RfLHAjwle0xVWDTpxY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Wxb55pMPrHmuPTHRSrkDNmCI82JlawWjsw/zAEtY4EE=; b=PWlAHvlQjkQPAvcQ8cqFRL2RqCr0Wsv8wKH/0CN8DCco8r2r5TeQV8gptJEYp1JVjS LvQF7kxK0FRKvvDdozuwEjWMhgyJZ+P7hf8PBAGUOShTmJYi2clR4WMFhrb7Ozii6osu GqvV6bQBqzk1WtIIxxao5wzdU/6hcmXaBFuPWwPvK29VPkjBiuv+g0r5wyJu2zoNo/nw g/IL2KqRzdy3na4kLJiDyxFds7Tp+P5W8999g4UmAkf1JLguvPM95ECtl2x6nhrqcxr0 B1L2tR1YyQsMiqgIhL+4g36n/5EY5J4otyF48jF4fBD4F94R2nFy2Kdtc/yakNBnfWGb irQQ== Received: by 10.180.8.40 with SMTP id o8mr26573921wia.9.1350759472710; Sat, 20 Oct 2012 11:57:52 -0700 (PDT) Received: from bremse.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id fp6sm21608299wib.0.2012.10.20.11.57.52 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Oct 2012 11:57:52 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sat, 20 Oct 2012 20:57:42 +0200 Message-Id: <1350759465-7171-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1350759465-7171-1-git-send-email-daniel.vetter@ffwll.ch> References: <1350759465-7171-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQkYUlPaOd+yep7G2mcjNWgkA3sukrPE5ODu4d5e8QHssbPZdY+yrvIZlePR+xjNnrhFzxsE Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 2/5] drm/i915: enable/disable backlight for eDP X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Like we already do for the LVDS panels. This seems to help greatly in setting up the backlight, since the BIOS might refuse to cooperate. Signed-off-by: Daniel Vetter Reviewed-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_dp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 265cec1..49846c0 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1128,6 +1128,8 @@ static void ironlake_edp_panel_off(struct intel_dp *intel_dp) DRM_DEBUG_KMS("Turn eDP power off\n"); + intel_panel_disable_backlight(dev); + WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n"); pp = ironlake_get_pp_control(dev_priv); @@ -1146,6 +1148,7 @@ static void ironlake_edp_backlight_on(struct intel_dp *intel_dp) { struct drm_device *dev = intel_dp->base.base.dev; struct drm_i915_private *dev_priv = dev->dev_private; + int pipe = to_intel_crtc(intel_dp->base.base.crtc)->pipe; u32 pp; if (!is_edp(intel_dp)) @@ -1163,6 +1166,8 @@ static void ironlake_edp_backlight_on(struct intel_dp *intel_dp) pp |= EDP_BLC_ENABLE; I915_WRITE(PCH_PP_CONTROL, pp); POSTING_READ(PCH_PP_CONTROL); + + intel_panel_enable_backlight(dev, pipe); } static void ironlake_edp_backlight_off(struct intel_dp *intel_dp)