Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751916AbdDCJCV convert rfc822-to-8bit (ORCPT ); Mon, 3 Apr 2017 05:02:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35326 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbdDCJCU (ORCPT ); Mon, 3 Apr 2017 05:02:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9E933C03BD6E Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9E933C03BD6E Message-ID: <1491210135.17505.31.camel@redhat.com> Subject: Re: [PATCH 2/2] drm: virtio: fix virtio_gpu_mode_dumb_create From: Gerd Hoffmann To: Daniel Vetter Cc: dri-devel@lists.freedesktop.org, lvivier@redhat.com, open list , "open list:VIRTIO GPU DRIVER" Date: Mon, 03 Apr 2017 11:02:15 +0200 In-Reply-To: <20170403075353.jqxrqshygfidn4f3@phenom.ffwll.local> References: <20170403070845.10793-1-kraxel@redhat.com> <20170403070845.10793-3-kraxel@redhat.com> <20170403075353.jqxrqshygfidn4f3@phenom.ffwll.local> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 03 Apr 2017 09:02:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1169 Lines: 31 On Mo, 2017-04-03 at 09:53 +0200, Daniel Vetter wrote: > On Mon, Apr 03, 2017 at 09:08:45AM +0200, Gerd Hoffmann wrote: > > Lookup format using virtio_gpu_translate_format() > > instead of hardcoding it. Fixes xorg display on > > bigendian guests (i.e. ppc64). > > > > Signed-off-by: Gerd Hoffmann > > ow ... :( > > With what kind of client have you tested this? fbdev? kms native? text console (fbcon) is fine, xorg (modesetting driver) fails. > Should we patch drm_fourcc.h and essentially state that _all_ drm_fourcc > are in native endian, don't dare mixing things up? Well, I don't think this needs clarification. I never assumed that fourcc is something else than native endian. It really was just an oversight in the virtio driver. One code path (which creates the framebuffer for fbdev emulation) did proper drm_fourcc -> virtio format mapping, including endianness handling. Patch 1/2 of this series factors this code out into a helper function so we can easily reuse it. The other code path (for creating dumb buffers) had the virtio format hardcoded which happened to work correctly in the little endian case. cheers, Gerd