From patchwork Fri Sep 21 17:25:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 147310 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1078600ljw; Fri, 21 Sep 2018 10:28:16 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda4huO6GQO6MtgHwwAc3RyU/bkTIpGTM970h6w/xhN5tLD0hzemNT/5OHsXQmgZqbWUuyhG X-Received: by 2002:a17:902:7587:: with SMTP id j7-v6mr45741999pll.256.1537550896549; Fri, 21 Sep 2018 10:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537550896; cv=none; d=google.com; s=arc-20160816; b=EGf/RshbBGGCnPWKGUbzmjVxph7msvyxTkWlFNuoecCKHcAul3Zj1AzHMTTxAzjRkh CxnFYeNHImajOkNQavUGtPZl15r453lfjPDeZAEnw6+gWjxFiS/dUzHo2zyif+fo0HAJ 6buflj0w27Bbn9cvxbNK2tlmQ5MPPN2yp6FwearPj/eDYLjM3l6EaF0siaeYnoS92lrU PekR3CNfPMIz8yZmR8RT9SUvw8Ck2mi46eOH1mlHgAfloN0AB2IYBZbbu6/kDSq6edMk 40RlwPKd4jFWVU30Y0yOMtBUFyBzHLB3yqSYuXgU7ZzQV4u5vn4zxj0YHGPEUpO9HAxd zOQA== 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 f3-v6si25808942pld.366.2018.09.21.10.28.16; Fri, 21 Sep 2018 10:28:16 -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 S2391012AbeIUXSF (ORCPT + 32 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 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(-) -- 1.9.1 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);