From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D44824E4B5 for ; Mon, 27 Jul 2026 08:54:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785142500; cv=none; b=Y6w73u/kILOxTqBc7itBoyh47KhJkaqAE6O1eaJgTYHIlHMwFyHLVyjCpxkJlDMmL/JawTjBNFsA9cfrGnM7o9u14S0nt1Axx0Ab7lQC/LwSjKPZVRXBDmRtjnSH/LXFpI1NesR8/XZ4L8nAPzbAgGFbYsFZnjwXuabiMXjAPiQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785142500; c=relaxed/simple; bh=0Cuz6QSOFaY9iA1sflpc8r1P4oafXjkfE0V7oJNA3z4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=F56+mSngjxVcKARPa+ymPVxWr+tU4semAW2A/YG8/AEdY0a+qLr8KVtYWcxqjlIe1eMxzixi3YB+gFBrP3A1i1Un6TDr2BgLhK/h2A+6UwUKEmJuN/onHZvd6UW8tWwVMtrWzeMHWt9srnDw547zQG2dYv5Sn1t+O2Lh3QnnQfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=hmMR6529; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hmMR6529" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1785142498; x=1816678498; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=0Cuz6QSOFaY9iA1sflpc8r1P4oafXjkfE0V7oJNA3z4=; b=hmMR6529D4dRn1u7FC5zUNZYzn6S5OHDyZ9L8gvr1ptxGgxfXtwKed9f DFOiWBslWGLosQ+ZohJIjL6K6sx8McenUmt/BkB/vdvQr7A4KhJizkfpT vInJDXBMK7I0tr/eYhf8SF8Vo3EeTv3DKf8OMobZY7rjIq1UmTtoaSpBQ DYlW0hOU8fkCC9mj+0FQ+FslAT4vgrUauogLErQEqXhPU+tzKesVblJDi P8MlC1KBPXkokiB9WU24xTIWxy7yov2K2lliSQAlZVSN4EQlfHRjEhokV l0rKPkWKJOaWZusbYopRt6doWyGy7MXk2ciMpRRhGrgcSUxcO09f+UEN6 Q==; X-CSE-ConnectionGUID: m3pc/gIvTju/JBXuWluawQ== X-CSE-MsgGUID: OKXJ/6haSJa6ZUD/L+rfWg== X-IronPort-AV: E=McAfee;i="6800,10657,11857"; a="85896674" X-IronPort-AV: E=Sophos;i="6.25,188,1779174000"; d="scan'208";a="85896674" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2026 01:54:57 -0700 X-CSE-ConnectionGUID: cuA/o1kUTbGv19xQciFyaQ== X-CSE-MsgGUID: +dQSctUyRqy1kdhhtx+i3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,188,1779174000"; d="scan'208";a="255422596" Received: from rvuia-mobl.ger.corp.intel.com (HELO localhost) ([10.245.245.197]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2026 01:54:54 -0700 From: Jani Nikula To: Jammy Huang , Thomas Zimmermann , Dave Airlie , Jocelyn Falempe , Maarten Lankhorst , Maxime Ripard , David Airlie , Simona Vetter , Ville =?utf-8?B?U3lyasOkbMOk?= Cc: "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2] drm/ast: DisplayPort edid supports 256 bytes In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland References: <20260317-upstream_ast_dp_edid-v2-1-31166703c491@aspeedtech.com> <2efefedd-a36a-4b3c-a2cd-89db3499ebdb@suse.de> Date: Mon, 27 Jul 2026 11:54:52 +0300 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, 21 Jul 2026, Jammy Huang wrote: > Hi Thomas, > > Good catch - returning 0 without writing to buf wasn't safe. But I > also found that returning -EIO isn't right either: _drm_do_get_edid() > treats EDID_BLOCK_READ_FAIL as fatal for any block index, not just > block 0, so that would have discarded the whole EDID for any monitor > reporting more than one extension. > > In v3, for block > 1 I now zero the buffer explicitly and return > 0. That makes drm_edid's block checker classify it as EDID_BLOCK_ZERO > instead, which is non-fatal - it gets trimmed via > edid_filter_invalid_blocks() (extensions count reduced, checksum > recomputed), and blocks 0 and 1 still come through fine. This also > directly addresses your point about the buffer not being guaranteed > zeroed, since we zero it ourselves now. There's a long-term goal to *not* modify the EDID in kernel, but rather return even the broken EDID extensions to userspace, if that's what the display has. There are probably a bunch of hurdles in making that happen, but intentionally returning zeroed out EDID blocks is just adding another unnecessary hurdle. BR, Jani. -- Jani Nikula, Intel