Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp50059pxh; Thu, 7 Apr 2022 13:38:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsLJO89V6jP4Jb3wPrMsz59wB5tPLI3Je9gahRlil1vqWzefiYsXirEs+8Kk1dTUVYEu8P X-Received: by 2002:a17:90a:cf91:b0:1ca:a055:b639 with SMTP id i17-20020a17090acf9100b001caa055b639mr17869820pju.204.1649363934697; Thu, 07 Apr 2022 13:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649363934; cv=none; d=google.com; s=arc-20160816; b=vpltowbdX3XS5ClhznWg5QtXkdBFNAN6WYiXWNL9qRpOIYIFCumPrpFlP4dxtU5Q2t pw+Be3a+OMjbyBZtVYb7f1mfSDY2TJ1CXpT07RTr0BJTGNIB5urkHHzuZWgiOj9Ze6Y/ 686okPk8IoSLLMdOPAxc4eLfwmwccdUvS8V8cRRHBVtqlypk11Ulih/6D/2TTO6IAAp6 74Pw6uIhEf2NaNVvtKgEfhxjOd/+l1G/kFC8L08FVnup4Y+vQle94FByK+WF6TmuuzkF m5XwT7Q5YAYPviJev1+d0FyjfYqvcW2DGa8lz+pczSNx1q0VjQmqbbnKHN57nf0pmqJw Scww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NDM7wlMq64JzrOWsB+7BgQsvGKPEysooG41+nOUmUp0=; b=kukByYQEzVt6l3m4aot9kFGxfjZrSNMJjtR/kKBN+PsZ0Pq9OhIinisrtUBXNiGjYH cQ9vR6OJUSBKDHrbhDJ+jqZ5ds59n8cULerSuJxnrColXHfNkqJfoEDxfjdpeuNvLsPT GB+WFUg//nq4eXbgJus174Ji0Svb8cxBZs+1YyQ3gzlmQRI8eEkF5CzKxSIV2H1kfhmL V6cY0i0qaiNR6RRwklvLvKYZfguUvui0s+O2YCwoCO0HVco7CRdaTtvVJNutK4BdNsLA HDy296jJ/dnSkXp7ETmBXruxAR8EAKWoHAA9w4aRX5YSAKUFlU9pfWVOlOZECysGS7Dh tiWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KVKDK10I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j4-20020a63e744000000b0038225bd6f70si19919979pgk.398.2022.04.07.13.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:38:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KVKDK10I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CF35B3B21B4; Thu, 7 Apr 2022 12:49:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345717AbiDGQbT (ORCPT + 99 others); Thu, 7 Apr 2022 12:31:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiDGQbR (ORCPT ); Thu, 7 Apr 2022 12:31:17 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61639AF1FB; Thu, 7 Apr 2022 09:29:12 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id l36so10450432ybj.12; Thu, 07 Apr 2022 09:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NDM7wlMq64JzrOWsB+7BgQsvGKPEysooG41+nOUmUp0=; b=KVKDK10IKH4hrbWXVdHXMgr7bRQOJ1oaOsNvUM3pw5sLy/QGpajD5M0JmmIj0hcT4C RreBmGFooTRgUbrJg/cUIjQSvre/H3DogX5vOfUb+oJbSm1fgryOaxHZIiG0yoyII9OP z8SIxf3voNWu32GFXzTOVbqS2h3XTHXICU9vbVT5QY0R/BD9t9FUaRa/uMeC+dXFchD8 p9if1WAU9tmrooVu9Un2iHQEoMvXlTdcnl91ODWRx2RurFvlydITOGZcz/q7Plonk0Ay Jj48eozySQ7kwpRVrFWhdMl9mkR9lBX0TAJZbNdqSmbELGHKPGFKLv+5e70QWka8L5Hv f7kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NDM7wlMq64JzrOWsB+7BgQsvGKPEysooG41+nOUmUp0=; b=qs/NcFB5xmfM4YP4owAYP0d26ShsZ6qocnPMQxHPYpfBwX7Wk+cQ1ABmpyLWdabwT4 UYBYAlIqxlqBk6WhH7W+uoT3YtdGUUFRvssfvYzG0OCMb37IjhiQ4HgEHW0Gc+WNIvO1 ckZ1hFOCJymTb0Oif9gHmXR7q2vdzxxHoJYRNzoDihwoX9DyREyscPJQDVUc/qUQKgg8 CiddJ7pYDnjy6z04dD3cykJrTtRLJboT9/rZ3wTisCgKKrRe8GN8lHe1w3PlmbSzKN3G DpaZL/0k3KbRca5J5OpDLB7zXXgcR0mU5i/dl3mp2iaWmIUOlaKaoSgSSiQWcHZpJHuA gKXQ== X-Gm-Message-State: AOAM532HG0Mbiaojje/uFubD+YmSA6tdXuwq0T7s+X3bYg9FsRKKq+sy VdU/QnLrOlgBIrzNnL+Kp9f50WTEtpC9quV69KM= X-Received: by 2002:a25:9783:0:b0:63e:f532:8374 with SMTP id i3-20020a259783000000b0063ef5328374mr109005ybo.415.1649348944476; Thu, 07 Apr 2022 09:29:04 -0700 (PDT) MIME-Version: 1.0 References: <1649312827-728-1-git-send-email-ssengar@linux.microsoft.com> In-Reply-To: <1649312827-728-1-git-send-email-ssengar@linux.microsoft.com> From: Deepak Rawat Date: Thu, 7 Apr 2022 09:28:53 -0700 Message-ID: Subject: Re: [PATCH v2] drm/hyperv: Added error message for fb size greater then allocated To: Saurabh Sengar Cc: ssengar@microsoft.com, David Airlie , Daniel Vetter , linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Michael Kelley , Dexuan Cui Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 6, 2022 at 11:27 PM Saurabh Sengar 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 > --- > 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 >