From patchwork Wed Nov 29 11:33:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Srb X-Patchwork-Id: 10081957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CE5A60234 for ; Wed, 29 Nov 2017 11:33:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ED8228727 for ; Wed, 29 Nov 2017 11:33:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1386C2963A; Wed, 29 Nov 2017 11:33:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A906128727 for ; Wed, 29 Nov 2017 11:33:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 663126E8CD; Wed, 29 Nov 2017 11:33:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id B517C6E8CD for ; Wed, 29 Nov 2017 11:33:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0B450AD14 for ; Wed, 29 Nov 2017 11:33:30 +0000 (UTC) From: msrb@suse.com To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: hibmc: Initialize the hibmc_bo_driver.io_mem_pfn Date: Wed, 29 Nov 2017 12:33:24 +0100 Message-Id: <20171129113324.20041-1-msrb@suse.com> X-Mailer: git-send-email 2.13.6 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Srb The io_mem_pfn field was added in ea642c3216cb2a60d1c0e760ae47ee85c9c16447 and is used unconditionally. Most drivers were updated to set it to the default implementation ttm_bo_default_io_mem_pfn, but hibmc was not. This fixes crash in ttm_bo_vm_fault when hibmc driver is used. Signed-off-by: Michal Srb --- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c index 3518167a7dc4..0b165ce4ee00 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c @@ -243,6 +243,7 @@ struct ttm_bo_driver hibmc_bo_driver = { .verify_access = hibmc_bo_verify_access, .io_mem_reserve = &hibmc_ttm_io_mem_reserve, .io_mem_free = NULL, + .io_mem_pfn = ttm_bo_default_io_mem_pfn, }; int hibmc_mm_init(struct hibmc_drm_private *hibmc)