From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Hellstrom Subject: Re: [PATCH 1/1] drm/vmwgfx: correct fb_fix_screeninfo.line_length Date: Mon, 30 Jun 2014 15:03:02 +0200 Message-ID: <53B16006.1080605@vmware.com> References: <1395967502-71219-1-git-send-email-chrisfriedt@gmail.com> <533A8E52.5050304@vmware.com> <53B14E9E.3040505@vmware.com> <53B15A94.3010402@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [208.91.2.12]) by gabe.freedesktop.org (Postfix) with ESMTP id B638689F82 for ; Mon, 30 Jun 2014 06:03:07 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Christopher Friedt Cc: linux-graphics-maintainer@vmware.com, linux-kernel@vger.kernel.org, dri-devel List-Id: dri-devel@lists.freedesktop.org On 06/30/2014 02:49 PM, Christopher Friedt wrote: > On Mon, Jun 30, 2014 at 8:39 AM, Thomas Hellstrom wrote: >> xf86-video-vmware in kms mode uses the kernel driver to set these registers. >> FWIW, the modesetting part of the kernel driver uses SVGA_REG_PITCHLOCK >> instead of >> SVGA_REG_BYTES_PER_LINE to set the pitch. That's probably where the >> clash happens. > That sounds a bit more accurate. Should kms and fbdev be setting both > registers then? >>From a quick browse of the device code, it looks like SVGA_REG_BYTES_PER_LINE is intended for reading only, but I've asked the experts that are on US time. However, since the function vmw_kms_write_svga() should set up the pitch correctly using PITCHLOCK, could you just try reverting the last line of your patch, the one that says vmw_write(vmw_priv, SVGA_REG_BYTES_PER_LINE, info->fix.line_length); That should hopefully fix the new bug and leave fbdev working as you intended. Thanks, Thomas