From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5D22A21A6F108 for ; Wed, 5 Apr 2017 05:58:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 96307C059754; Wed, 5 Apr 2017 12:58:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 96307C059754 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 96307C059754 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-13.phx2.redhat.com [10.3.116.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7FDA291BB5; Wed, 5 Apr 2017 12:58:20 +0000 (UTC) To: Phil Dennis-Jordan References: <1491386280-50077-1-git-send-email-lists@philjordan.eu> <1491386280-50077-4-git-send-email-lists@philjordan.eu> <31192690-0c6a-ce61-8c8f-a19be1c3ccb4@redhat.com> Cc: Phil Dennis-Jordan , edk2-devel@lists.01.org, Jordan Justen From: Laszlo Ersek Message-ID: Date: Wed, 5 Apr 2017 14:58:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Apr 2017 12:58:21 +0000 (UTC) Subject: Re: [PATCH v3 3/3] OvmfPkg/QemuVideoDxe: VMWare SVGA device support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 12:58:22 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 04/05/17 14:37, Phil Dennis-Jordan wrote: >> In fact, above you already have a (BitsPerPixel == 32) check. At the end >> of that block, you could set PixelMask to MAX_UINT32 explicitly. And, >> you could add an "else" branch, simply with >> >> PixelMask = (1u << (BitsPerPixel - 1)) - 1; >> >> What do you think? > I'm pretty sure you mean > > PixelMask = (0x1u << BitsPerPixel) - 1; Heh, right :)