Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp71001imm; Fri, 21 Sep 2018 10:28:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZgoLGv4U9QhlOkTpflILPfHjCMCmVTLZh6L106vAzdsvjgdD3TTodWatnaMbCVZISUsADx X-Received: by 2002:a17:902:2:: with SMTP id 2-v6mr46155918pla.181.1537550927846; Fri, 21 Sep 2018 10:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537550927; cv=none; d=google.com; s=arc-20160816; b=kaxtUvveE7D/qWUQs65UAryA5FQku2hRQp/rWTceRn7ti9waHeV77mILzdw56Q/SkW SqZUsn1gEMcIVAKnATKKkcfrJ1/KicEY50jbtGb/BaDXiwGkiAH+erWu2gVtrNOLLFK5 00DYQsUCGv27/Pwe+QnMF22RAmMLE54KeUSvF6RahtB3pSTy0TOJAkILok2AVS6DykfP D7Q4ab8Jkda8t/nTKzny9PKREytzLFx/AYUPVQyL+5b75FK9u7BFh6wPrrFbeYAE7RHs 3nHSxuFlL8GnHqLZaK5JlRXCJsehLp3BeIhtkT01E4cjN8D6jounFcFTQOrhfBnIpgRh A5wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=qesBWjA3w7c3NnxBDSjPYzShcAIzUcBGddrRzY8q/SU=; b=mxZtQlbQvSdGwONXkmyFtopRF9/M/5ghl943VcHLcKWWg973GPQaBUJrecZfqRJ7bM VDx7O+NpHl6Cpy4qrMWN+Bq8CMVJENJCpBhJaSYvcjzLdBFH40h6Y8jMQan8+usB1O7w Ram+09cNzmJXIveM9LCOp/0+BdPGg6v56h+eaUSh8ZjNxRGMfcdm6th+OO3Ky12lM9jn mbJi9PhKwBK7fSnOVY5Sw1LEvJkTVF2OqXUGFLzl0qQOS/Xw66Iz+bxx7OJnT9CJHuXe t7+pBjatPtX7vbFN8tXst95PkH0jwRpec21Vk6alQ03sg0JWCLPlFCw8LkdbePeI05ZT djjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si26688160pli.238.2018.09.21.10.28.32; Fri, 21 Sep 2018 10:28:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391008AbeIUXSF (ORCPT + 99 others); Fri, 21 Sep 2018 19:18:05 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44254 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390180AbeIUXSF (ORCPT ); Fri, 21 Sep 2018 19:18:05 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9D8FDCE058318; Sat, 22 Sep 2018 01:28:09 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.399.0; Sat, 22 Sep 2018 01:28:04 +0800 From: John Garry To: , , , CC: , , , , , , , John Garry Subject: [PATCH 2/3] drm/hisilicon: hibmc: Don't overwrite fb helper surface depth Date: Sat, 22 Sep 2018 01:25:26 +0800 Message-ID: <1537550727-21257-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537550727-21257-1-git-send-email-john.garry@huawei.com> References: <1537550727-21257-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the driver overwrites the surface depth provided by the fb helper to give an invalid bpp/surface depth combination. This has been exposed by commit 70109354fed2 ("drm: Reject unknown legacy bpp and depth for drm_mode_addfb ioctl"), which now causes the driver to fail to probe. Fix by not overwriting the surface depth. Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer") Signed-off-by: John Garry --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c index 8bd2907..edcca17 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c @@ -71,7 +71,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper, DRM_DEBUG_DRIVER("surface width(%d), height(%d) and bpp(%d)\n", sizes->surface_width, sizes->surface_height, sizes->surface_bpp); - sizes->surface_depth = 32; bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8); -- 1.9.1