From patchwork Wed Jul 17 13:07:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Egbert Eich X-Patchwork-Id: 2828592 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C2BCCC0AB2 for ; Wed, 17 Jul 2013 13:14:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1E562014C for ; Wed, 17 Jul 2013 13:14:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 848432011E for ; Wed, 17 Jul 2013 13:14:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 776E2E6F19 for ; Wed, 17 Jul 2013 06:14:02 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by gabe.freedesktop.org (Postfix) with ESMTP id A7D85E6780 for ; Wed, 17 Jul 2013 06:07:53 -0700 (PDT) Received: from debian (p5DCF2FCF.dip0.t-ipconnect.de [93.207.47.207]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MPt2M-1V3Gwm1eEM-005KQ0; Wed, 17 Jul 2013 15:07:50 +0200 Received: from sles11.fritz.box (sles11.fritz.box [192.168.178.22]) by debian (Postfix) with ESMTP id 4298D13C7D; Wed, 17 Jul 2013 15:07:47 +0200 (CEST) From: Egbert Eich To: dri-devel@lists.freedesktop.org Subject: [PATCH 11/16] drm/mgag200: Initialize data needed to map fbdev memory Date: Wed, 17 Jul 2013 15:07:24 +0200 Message-Id: <1374066449-21714-12-git-send-email-eich@suse.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1374066449-21714-1-git-send-email-eich@suse.com> References: <1374066449-21714-1-git-send-email-eich@suse.com> X-Provags-ID: V02:K0:99/fEDoquOPKHYFA5XNwmfQhrdwjHDkFrYubBCYG+a8 /8fzJnrsoUus5FbJbyp72NzOjTQVBv3BixlLopN4kmg+6WVm9y /n56X03BstgPtw+MQmHXgVPfN4NYYDqgwllyvPWCoU1dK5Rwlr /rL/LFNkCRrmuKbMlc9IX+cTFF3Wz30WE+IQZZ8/PaPctZbeEc FWkt/DM7n+mplZzJ0YKA0/c/WDENdyTuOG8ROnh9frTUl/Vvgl 4CKM2J5UOE4m95vcpcFlTIHhZyz5wNAog7of70iwXah9CbEeez e7KfHxunqcp/ccOglI0bH5F1wxpOllLnqYRNrXUX9f8JIGbp/K Uy9Atetw0S3JosqS1AxEQRTqN4Hdf7MaPEHXnW7RM Cc: Egbert Eich , Egbert Eich , Mathieu Larouche , Dave Airlie , Christopher Harvey X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Due to a missing initialization there was no way to map fbdev memory. Thus for example using the Xserver with the fbdev driver failed. This fix adds initialization for fix.smem_start and fix.smem_len in the fb_info structure, which fixes this problem. Signed-off-by: Egbert Eich --- drivers/gpu/drm/mgag200/mgag200_fb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mgag200/mgag200_fb.c b/drivers/gpu/drm/mgag200/mgag200_fb.c index 371f3eb..94c64de 100644 --- a/drivers/gpu/drm/mgag200/mgag200_fb.c +++ b/drivers/gpu/drm/mgag200/mgag200_fb.c @@ -231,6 +231,8 @@ static int mgag200fb_create(struct drm_fb_helper *helper, } info->apertures->ranges[0].base = mdev->dev->mode_config.fb_base; info->apertures->ranges[0].size = mdev->mc.vram_size; + info->fix.smem_start = mdev->dev->mode_config.fb_base; + info->fix.smem_len = size; drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); drm_fb_helper_fill_var(info, &mfbdev->helper, sizes->fb_width,