From: "Guttula, Suresh" <Suresh.Guttula-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Guttula, Suresh" <Suresh.Guttula-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH] drm/amd/display: set backlight level limit to 1
Date: Thu, 25 Oct 2018 06:58:48 +0000 [thread overview]
Message-ID: <1540450705-25342-1-git-send-email-suresh.guttula@amd.com> (raw)
This patch will work as workaround for silicon limitation
related to PWM dutycycle when the backlight level goes to 0.
Actually PWM value is 16 bit value and valid range from 1-65535.
when ever user requested to set this PWM value to 0 which is not
fall in the range, in VBIOS taken care this by limiting to 1.
This patch here will do the same. Either driver or VBIOS can not
pass 0 value as it is not a valid range for PWM and it will
give a high PWM pulse which is not the intented behaviour as
per HW constraints.
Signed-off-by: suresh guttula <suresh.guttula@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 492230c..38f84b2 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1518,6 +1518,14 @@ static int amdgpu_dm_backlight_update_status(struct backlight_device *bd)
{
struct amdgpu_display_manager *dm = bl_get_data(bd);
+ /*
+ * When we use brightness low key to reduce the brightness,
+ * brightness level reaching to 0, with which we can see flash
+ * screen on ui beacuse of HW limitation.To avoid that we are
+ * limiting level to 1
+ */
+ if (bd->props.brightness < 1)
+ return 1;
if (dc_link_set_backlight_level(dm->backlight_link,
bd->props.brightness, 0, 0))
return 0;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2018-10-25 6:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 6:58 Guttula, Suresh [this message]
[not found] ` <1540450705-25342-1-git-send-email-suresh.guttula-5C7GfCeVMHo@public.gmane.org>
2018-10-25 18:34 ` [PATCH] drm/amd/display: set backlight level limit to 1 Wentland, Harry
[not found] ` <76a9d860-b8de-64fd-4821-5974fcb3008c-5C7GfCeVMHo@public.gmane.org>
2018-10-26 6:44 ` Guttula-CC+yJ3UmIYqDUpFQwHEjaQ
[not found] ` <6e5e8021-38e2-d1af-b82c-2646e2863f73-5C7GfCeVMHo@public.gmane.org>
2018-10-26 14:03 ` Wentland, Harry
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=1540450705-25342-1-git-send-email-suresh.guttula@amd.com \
--to=suresh.guttula-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.