From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com ([192.55.52.93]:53087 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbdBJMgu (ORCPT ); Fri, 10 Feb 2017 07:36:50 -0500 From: Jani Nikula To: Hans de Goede , Daniel Vetter , Ville =?utf-8?B?U3lyasOkbMOk?= Cc: intel-gfx , dri-devel@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [PATCH] drm/i915: Fix not finding the VBT when it overlaps with OPREGION_ASLE_EXT In-Reply-To: <51453855-216b-1966-226f-b223badf61b7@redhat.com> References: <20161225101928.7618-1-hdegoede@redhat.com> <87vasnby1e.fsf@intel.com> <51453855-216b-1966-226f-b223badf61b7@redhat.com> Date: Fri, 10 Feb 2017 14:21:07 +0200 Message-ID: <87d1eqs0cs.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org List-ID: On Fri, 10 Feb 2017, Hans de Goede wrote: > On 06-02-17 08:04, Jani Nikula wrote: >> First, I want a big fat warning comment about what's going on >> here. Otherwise someone's bound to "fix" this later on. > > Done for v2, which I will send shortly. Thanks. >> Second, per the spec, the ASLE ext mailbox is 1k in size, and there's a >> 1k reserved region at the end. We probably shouldn't allow VBT to extend >> over there. But hey, per the spec we also shouldn't allow VBT to extend >> over mailbox #5 either. So if you can't be bothered with that, neither >> will I. > > Hmm, that makes no sense, OPREGION_SIZE is 8192 bytes or 0x2000, > OPREGION_ASLE_EXT_OFFSET is 0x1C00 or 7168 bytes, if there is 1k > reserved after the ASLE ext mailbox then there is exactly 0 bytes > available for the ASLE ext mailbox or OPREGION_SIZE should be 9216 > not 8192 (which I don't think so). Maybe the last 1k is either > the ASLE ext mailbox OR reserved ? You're quite right, that makes no sense. :) Looks like we account for the reserved part at the end of struct opregion_asle_ext, but the spec isn't quite clear whether the reserved part is actually part of the mailbox or not. I'm not quite sure how I managed to confuse myself to turn that into 1k. Sorry. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center