Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp51317pxh; Thu, 7 Apr 2022 13:41:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwncPH2hy/bNSh8yc+l466Pi2/t0pw7m2gEUsJw4R8FvYc/Iq7tydjYc0LlvVK+Ar6zUSJ7 X-Received: by 2002:a17:90a:a58c:b0:1c9:bc35:6ed9 with SMTP id b12-20020a17090aa58c00b001c9bc356ed9mr17515123pjq.146.1649364075359; Thu, 07 Apr 2022 13:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649364075; cv=none; d=google.com; s=arc-20160816; b=lrweEfsbvQejFMAtR6FkDwlKdy5inqrnNLnxMhs29SRxjIVRV7pRZBFyd0pOK+8OIk HOETQh4uL4Ha0+r6d+ps+KELrY8WWGB5XvTWoJVcIQF0PfvPxpFDZom2t4k8WZLd9itO vKbqfUKdto5Y85yVx7XPEsmhwQS4H/sMRKpNZbDZQQzwqlGO3c9NQxoZOK//ABU3yblH o2Uua7yp08PlrPpGVxa3B4ph1DxGAXI7cqTfJgfIi/J5xH95TAWewDCKL57wtzbohZrF dblhQt934B1jh+SsPMXPsTGqqihcd1c32qbYD8JNliDQ2wNj7koLfBW+A4Q+sQBXUTrN Lhqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from:dkim-signature :dkim-filter; bh=+Pnzj39Opt9yrx6cP1jUMpJnfuLDJgNSePHcqtwwDY8=; b=O51suP8q9IXKnOpccVEqnIo4QLZrmD7M5Vw8kdTbdXELg67jgz5XGN/KFeIA27kXq1 do/wHm7TM/aCYc7QPBYRwmhej1dE4IFjkpvosglvBOK6SbW6hljDv4JVGcmyXFSHMpW1 nV68vERc8NVk1cJT0PUTubfeXpmBKlvmXgwe2Xxgfes8LJUfWhVFMvZQ+E/XOpp51alj 2X1YKT5RPUGo7d5nOEG8dPOi3j9BlNMq2QV20qVnJ6DUJtQsJCUW9FkdPFN2hizCpoug ShL/4ykNTOmAOiXq4qtBWrRBvy3GhPqQFbs8jbzCGdBJDsRErqzIxVODYvMEJ0u0Utls sdYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=bfBTwX2c; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f9-20020a170902ab8900b00153d494a63bsi607266plr.392.2022.04.07.13.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:41:15 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=bfBTwX2c; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2872B3C5986; Thu, 7 Apr 2022 12:52:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241098AbiDGG30 (ORCPT + 99 others); Thu, 7 Apr 2022 02:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241087AbiDGG3P (ORCPT ); Thu, 7 Apr 2022 02:29:15 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C8F51F6879; Wed, 6 Apr 2022 23:27:16 -0700 (PDT) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 06DFD20DFD9E; Wed, 6 Apr 2022 23:27:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 06DFD20DFD9E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649312836; bh=+Pnzj39Opt9yrx6cP1jUMpJnfuLDJgNSePHcqtwwDY8=; h=From:To:Subject:Date:From; b=bfBTwX2cJDZnXkN6fE8iivJWmkTXZ97SKxT7RSl8439jhgpzbi8q4OUOHjIFya9jO O9VulIr3MzonZaX32ngeo+gt2fUxSoqKc5gTtgEmWgAHbCSeBF3IK58sSLL1jV7Za8 v1w3zVYlWDBmOf1EtH+oqNG3Ak6ZeESe0G4HyLWk= From: Saurabh Sengar To: ssengar@microsoft.com, drawat.floss@gmail.com, airlied@linux.ie, daniel@ffwll.ch, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, mikelley@microsoft.com, decui@microsoft.com Subject: [PATCH v2] drm/hyperv: Added error message for fb size greater then allocated Date: Wed, 6 Apr 2022 23:27:07 -0700 Message-Id: <1649312827-728-1-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 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); return -EINVAL; + } return 0; } -- 1.8.3.1