Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7887be21 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Tanmay Shah
Browse files

drm: probe_helper: Hide ugly ifdef



Push the ifdef to the drm_edid.h and create a stub, for the
DRM_LOAD_EDID_FIRMWARE=n case. This removes some clutter in
the code, making it more readable.

Signed-off-by: default avatarEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1461087638-16959-1-git-send-email-ezequiel@vanguardiasur.com.ar
Git-commit: ba34d58c5e86c27accb3133fa991cfb6c848c58e
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Change-Id: Ice586a7d90538d77a3f120bb9ba6214e17b926d0
Signed-off-by: default avatarTanmay Shah <tanmay@codeaurora.org>
parent 02b5c470
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -205,10 +205,8 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect
		count = drm_add_edid_modes(connector, edid);
		drm_edid_to_eld(connector, edid);
	} else {
#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
		count = drm_load_edid_firmware(connector);
		if (count == 0)
#endif
			count = (*connector_funcs->get_modes)(connector);
	}

+8 −0
Original line number Diff line number Diff line
@@ -347,7 +347,15 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb);
int drm_av_sync_delay(struct drm_connector *connector,
		      const struct drm_display_mode *mode);
struct drm_connector *drm_select_eld(struct drm_encoder *encoder);

#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
int drm_load_edid_firmware(struct drm_connector *connector);
#else
static inline int drm_load_edid_firmware(struct drm_connector *connector)
{
	return 0;
}
#endif

int
drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,