From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm: check_pixel_format() should return true if no modifiers are passed for a supported pixel format Date: Fri, 25 May 2018 18:54:56 +0300 Message-ID: <20180525155456.GF23723@intel.com> References: <1527262541-13964-1-git-send-email-ayan.halder@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <1527262541-13964-1-git-send-email-ayan.halder@arm.com> Sender: linux-kernel-owner@vger.kernel.org To: Ayan Kumar Halder Cc: liviu.dudau@arm.com, brian.starkey@arm.com, alexandru-cosmin.gheorghe@arm.com, gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, nd@arm.com List-Id: dri-devel@lists.freedesktop.org On Fri, May 25, 2018 at 04:35:41PM +0100, Ayan Kumar Halder wrote: > If a plane supports a pixel format and the framebuffer does not pass any > modifiers, then drm_plane_check_pixel_format() should always return true > for the given format regardless of whether the plane supports any > modifiers or not. If your plane supports DRM_FORMAT_MOD_LINEAR then you should add that to the plane's modifier list. > > Signed-off-by: Ayan Kumar Halder > --- > drivers/gpu/drm/drm_plane.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c > index 6d2a6e4..873c084 100644 > --- a/drivers/gpu/drm/drm_plane.c > +++ b/drivers/gpu/drm/drm_plane.c > @@ -564,6 +564,9 @@ int drm_plane_check_pixel_format(struct drm_plane *plane, > if (!plane->modifier_count) > return 0; > > + if (modifier == DRM_FORMAT_MOD_NONE) > + return 0; > + > for (i = 0; i < plane->modifier_count; i++) { > if (modifier == plane->modifiers[i]) > break; > -- > 2.7.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Ville Syrjälä Intel