dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Deepak Rawat <drawat.floss@gmail.com>
To: Saurabh Sengar <ssengar@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org, David Airlie <airlied@linux.ie>,
	ssengar@microsoft.com, Dexuan Cui <decui@microsoft.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Michael Kelley <mikelley@microsoft.com>
Subject: Re: [PATCH v2] drm/hyperv: Added error message for fb size greater then allocated
Date: Thu, 7 Apr 2022 09:28:53 -0700	[thread overview]
Message-ID: <CAHFnvW2V0tz25D4YMxYMNqYs5uMkbjEoc6p93e6naBhvybzmoQ@mail.gmail.com> (raw)
In-Reply-To: <1649312827-728-1-git-send-email-ssengar@linux.microsoft.com>

On Wed, Apr 6, 2022 at 11:27 PM Saurabh Sengar
<ssengar@linux.microsoft.com> wrote:
>
> Added error message when the size of requested framebuffer is more then
> the allocated size by vmbus mmio region for framebuffer
>
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> ---
> v1 -> v2 : Corrected Sign-off
>
>  drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> index e82b815..92587f0 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> @@ -123,8 +123,11 @@ static int hyperv_pipe_check(struct drm_simple_display_pipe *pipe,
>         if (fb->format->format != DRM_FORMAT_XRGB8888)
>                 return -EINVAL;
>
> -       if (fb->pitches[0] * fb->height > hv->fb_size)
> +       if (fb->pitches[0] * fb->height > hv->fb_size) {
> +               drm_err(&hv->dev, "hv->hdev, fb size requested by process %s for %d X %d (pitch %d) is greater then allocated size %ld\n",
> +               current->comm, fb->width, fb->height, fb->pitches[0], hv->fb_size);

Any reason to add an error message here. Since this function is called
whenever there is an update, avoid printing an error here.

>                 return -EINVAL;
> +       }
>
>         return 0;
>  }
> --
> 1.8.3.1
>

  parent reply	other threads:[~2022-04-07 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  6:27 [PATCH v2] drm/hyperv: Added error message for fb size greater then allocated Saurabh Sengar
2022-04-07 13:14 ` Wei Liu
2022-04-07 16:28 ` Deepak Rawat [this message]
2022-04-07 17:43   ` Saurabh Singh Sengar

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=CAHFnvW2V0tz25D4YMxYMNqYs5uMkbjEoc6p93e6naBhvybzmoQ@mail.gmail.com \
    --to=drawat.floss@gmail.com \
    --cc=airlied@linux.ie \
    --cc=decui@microsoft.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=ssengar@microsoft.com \
    /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;
as well as URLs for NNTP newsgroup(s).