diff mbox

[06/10] drm/modes: Kill off the oddball DRM_MODE_TYPE_CRTC_C vs. DRM_MODE_TYPE_BUILTIN handling

Message ID 20171114183258.16976-7-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Nov. 14, 2017, 6:32 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

For some reason drm_mode_set_crtcinfo() does nothing of the mode has
the DRM_MODE_TYPE_BUILTIN flag set without the other bit from
DRM_MODE_TYPE_CRTC_C also set. I have zero idea what that is supposed
to achieve, but since we have no users for neither flag bit let's kill
this nonsense off.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_modes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson Nov. 14, 2017, 6:43 p.m. UTC | #1
Quoting Ville Syrjala (2017-11-14 18:32:54)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> For some reason drm_mode_set_crtcinfo() does nothing of the mode has
s/of/if/

> the DRM_MODE_TYPE_BUILTIN flag set without the other bit from
> DRM_MODE_TYPE_CRTC_C also set. I have zero idea what that is supposed
> to achieve, but since we have no users for neither flag bit let's kill
> this nonsense off.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Alex Deucher Nov. 14, 2017, 7:16 p.m. UTC | #2
On Tue, Nov 14, 2017 at 1:43 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Ville Syrjala (2017-11-14 18:32:54)
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> For some reason drm_mode_set_crtcinfo() does nothing of the mode has
> s/of/if/

With the typo fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

>
>> the DRM_MODE_TYPE_BUILTIN flag set without the other bit from
>> DRM_MODE_TYPE_CRTC_C also set. I have zero idea what that is supposed
>> to achieve, but since we have no users for neither flag bit let's kill
>> this nonsense off.
>>
>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index f99ba963fb3e..68a8ba4c2c38 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -833,7 +833,7 @@  EXPORT_SYMBOL(drm_mode_get_hv_timing);
  */
 void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags)
 {
-	if ((p == NULL) || ((p->type & DRM_MODE_TYPE_CRTC_C) == DRM_MODE_TYPE_BUILTIN))
+	if (!p)
 		return;
 
 	p->crtc_clock = p->clock;