All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Casey Bowman <casey.g.bowman@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_psr: Added ENOENT error check to psr_set for older kernels
Date: Tue, 02 Oct 2018 10:50:33 -0700	[thread overview]
Message-ID: <2455734.iny254CoEU@dk-thinkpad-x260> (raw)
In-Reply-To: <20180929000131.142820-1-casey.g.bowman@intel.com>

On Friday, September 28, 2018 5:01:31 PM PDT Casey Bowman wrote:
> Only EINVAL was being used to account for older kernels,
> but on legacy kernels that don't use i915_edp_psr_debug,
> the ENOENT error will be thrown. This changes the logic
> to also account for ENOENT errors.
> 
> Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
> ---
>  lib/igt_psr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 0ddfb64f..8cb41a55 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -103,7 +103,7 @@ static bool psr_set(int debugfs_fd, bool enable)
>  		return false;
>  	}
> 
> -	if (ret == -EINVAL) {
> +	if (ret == -EINVAL || ret == -ENOENT) {

Please move this logic to has_psr_debugfs() and expand the existing 
documentation about return values from the kernel.

-DK


>  		ret = psr_modparam_set(enable);
>  	} else {
>  		ret = psr_write(debugfs_fd, enable ? "0x3" : "0x1");




_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2018-10-02 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-29  0:01 [igt-dev] [PATCH i-g-t] lib/igt_psr: Added ENOENT error check to psr_set for older kernels Casey Bowman
2018-10-01 13:48 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2018-10-02 17:50 ` Dhinakaran Pandiyan [this message]

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=2455734.iny254CoEU@dk-thinkpad-x260 \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=casey.g.bowman@intel.com \
    --cc=igt-dev@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.