<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000"><br>
Minor formatting issues - there's a number of lines that exceed 80
characters in length. One other comment inline below.<br>
<span><br>
Reviewed-by: Todd Previte <a class="moz-txt-link-rfc2396E" href="mailto:tprevite@gmail.com"><tprevite@gmail.com></a><br>
</span><br>
<blockquote style="border: 0px none;"
cite="mid:1400640904-16847-6-git-send-email-airlied@gmail.com"
type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="airlied@gmail.com" photoname="Dave Airlie"
src="cid:part1.03070000.00000904@gmail.com" name="postbox-contact.jpg"
height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:airlied@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Dave Airlie</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Tuesday, May 20,
2014 7:54 PM</span></font></div></div></div>
<div style="color: rgb(136, 136, 136); margin-left: 24px;
margin-right: 24px;" __pbrmquotes="true" class="__pbConvBody">
<div>From: Dave Airlie <a class="moz-txt-link-rfc2396E" href="mailto:airlied@redhat.com"><airlied@redhat.com></a><br><br>This is
required to get fbcon probing to work on new connectors,<br>callers
should acquire the mode config lock before calling these.<br><br>Signed-off-by:
Dave Airlie <a class="moz-txt-link-rfc2396E" href="mailto:airlied@redhat.com"><airlied@redhat.com></a><br>---<br>
drivers/gpu/drm/drm_fb_helper.c | 53
+++++++++++++++++++++++++++++++++++++++++<br>
include/drm/drm_fb_helper.h | 4 ++++<br> 2 files changed, 57
insertions(+)<br><br>diff --git a/drivers/gpu/drm/drm_fb_helper.c
b/drivers/gpu/drm/drm_fb_helper.c<br>index 04d3fd3..a184204 100644<br>---
a/drivers/gpu/drm/drm_fb_helper.c<br>+++
b/drivers/gpu/drm/drm_fb_helper.c<br>@@ -105,6 +105,58 @@ fail:<br> }<br>
EXPORT_SYMBOL(drm_fb_helper_single_add_all_connectors);<br> <br>+int
drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct
drm_connector *connector)<br>+{<br>+ struct drm_fb_helper_connector
**temp;<br>+ struct drm_fb_helper_connector *fb_helper_connector;<br>+<br>+
WARN_ON(!mutex_is_locked(&fb_helper->dev->mode_config.mutex));<br>+
if (fb_helper->connector_count + 1 >
fb_helper->connector_info_alloc_count) {<br>+ temp =
krealloc(fb_helper->connector_info, sizeof(struct
drm_fb_helper_connector) * (fb_helper->connector_count + 1),
GFP_KERNEL);<br>+ if (!temp)<br>+ return -ENOMEM;<br>+<br>+
fb_helper->connector_info_alloc_count = fb_helper->connector_count
+ 1;<br>+ fb_helper->connector_info = temp;<br>+ }<br>+<br>+<br>+
fb_helper_connector = kzalloc(sizeof(struct drm_fb_helper_connector),
GFP_KERNEL);<br>+ if (!fb_helper_connector)<br>+ return -ENOMEM;<br>+<br>+
fb_helper_connector->connector = connector;<br>+
fb_helper->connector_info[fb_helper->connector_count++] =
fb_helper_connector;<br>+ return 0;<br>+}<br>+EXPORT_SYMBOL(drm_fb_helper_add_one_connector);<br>+<br>+int
drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,<br>+
struct drm_connector *connector)<br>+{<br>+ struct
drm_fb_helper_connector *fb_helper_connector;<br>+ int i, j;<br>+<br>+
WARN_ON(!mutex_is_locked(&fb_helper->dev->mode_config.mutex));<br>+<br>+
for (i = 0; i < fb_helper->connector_count; i++) {<br>+ if
(fb_helper->connector_info[i]->connector == connector)<br>+
break;<br>+ }<br>+<br>+ if (i == fb_helper->connector_count)<br>+
return -EINVAL;<br>+ fb_helper_connector =
fb_helper->connector_info[i];<br>+<br>+ for (j = i + 1; j <
fb_helper->connector_count; j++) {<br>+
fb_helper->connector_info[j - 1] = fb_helper->connector_info[j];<br>+
}<br></div>
</div>
</blockquote>
Why switch to using a different index variable here? Seems like you
could just increment i and keep going...<br>
<blockquote style="border: 0px none;"
cite="mid:1400640904-16847-6-git-send-email-airlied@gmail.com"
type="cite">
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<div>+ fb_helper->connector_count--;<br>+
kfree(fb_helper_connector);<br>+ return 0;<br>+}<br>+EXPORT_SYMBOL(drm_fb_helper_remove_one_connector);<br>+<br>
static int drm_fb_helper_parse_command_line(struct drm_fb_helper
*fb_helper)<br> {<br> struct drm_fb_helper_connector *fb_helper_conn;<br>@@
-534,6 +586,7 @@ int drm_fb_helper_init(struct drm_device *dev,<br>
kfree(fb_helper->crtc_info);<br> return -ENOMEM;<br> }<br>+
fb_helper->connector_info_alloc_count =
dev->mode_config.num_connector;<br> fb_helper->connector_count =
0;<br> <br> for (i = 0; i < crtc_count; i++) {<br>diff --git
a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h<br>index
6e622f7..4abb415 100644<br>--- a/include/drm/drm_fb_helper.h<br>+++
b/include/drm/drm_fb_helper.h<br>@@ -86,6 +86,7 @@ struct drm_fb_helper {<br>
int crtc_count;<br> struct drm_fb_helper_crtc *crtc_info;<br> int
connector_count;<br>+ int connector_info_alloc_count;<br> struct
drm_fb_helper_connector **connector_info;<br> struct
drm_fb_helper_funcs *funcs;<br> struct fb_info *fbdev;<br>@@ -128,4
+129,7 @@ struct drm_display_mode *<br> drm_pick_cmdline_mode(struct
drm_fb_helper_connector *fb_helper_conn,<br> int width, int
height);<br> <br>+int drm_fb_helper_add_one_connector(struct
drm_fb_helper *fb_helper, struct drm_connector *connector);<br>+int
drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,<br>+
struct drm_connector *connector);<br> #endif<br></div>
</div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="airlied@gmail.com" photoname="Dave Airlie"
src="cid:part1.03070000.00000904@gmail.com" name="postbox-contact.jpg"
height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:airlied@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Dave Airlie</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Tuesday, May 20,
2014 7:54 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>Hey,<br><br>So this set is
pretty close to what I think we should be merging initially,<br><br>Since
the last set, it makes fbcon and suspend/resume work a lot better,<br><br>I've
also fixed a couple of bugs in -intel that make things work a lot<br>better.<br><br>I've
bashed on this a bit using kms-flip from intel-gpu-tools, hacked<br>to
add 3 monitor support.<br><br>It still generates a fair few i915 state
checker backtraces, and some<br>of them are fairly hard to work out, it
might be we should just tone<br>down the state checker for
encoders/connectors with no actual hw backing<br>them.<br><br>Dave.<br><br>_______________________________________________<br>Intel-gfx
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br><a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br></div></div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div><font size="-1">Sent using Postbox:<br><a
href="http://www.getpostbox.com"><span style="color: rgb(51, 102, 153);">http://www.getpostbox.com</span></a></font></div></div>
</body></html>