<pre>
Hi Angelo,
Thanks for the reviews.
[snip]
> > > >
> > > > +
> > > > +if (ret <= 0) {
> > > > +DRM_INFO("Failed to find comp in ddp table, ret
> > > > =%d\n",
> > > > ret);
> > > > +ret = 0;
> > >
> > > Why are you returning 0 for error here?!
> >
> > Because this function return 0 means not found any valid crtc bits.
> > Should I change this?
> >
>
> Yes, please, return a relevant error code instead.
>
I found that the return type of this function is 'unsigned int', I
think returning error code instead will change the original behavior of
returning 0 as not finding any possible crtc.
e.g. drm_encoder_ok() in drm_encoder.h will check:
!!(encoder->possible_crtcs & drm_crtc_mask(crtc))
The negative error code convert to unsigned int will be a huge number
and that may cause the unexpected result here.
Regards,
Jason-JH.Lin
> Thanks,
> Angelo
>
> > Regards,
> > Jason-JH.Lin
> >
> > >
> > > > +}
> > > >
> > > > return ret;
> > > > }
> > >
> > > Regards,
> > > Angelo
> > >
>
>
>
</pre><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->